Article View: comp.lang.c++
Article #784Re: C++26 failed its DIS ballot.
From: David Brown
Date: Sat, 07 Nov 2026 11:58
Date: Sat, 07 Nov 2026 11:58
20 lines
2282 bytes
2282 bytes
On 06/11/2026 23:47, Oodini wrote: > Le 26/10/2026 à 15:19, David Brown a écrit : > >> To me, it seems obvious that it is up to the caller code to make sure >> the preconditions are fulfilled - checking must therefore be on the >> caller side, not the callee side. If the precondition fails, the bug >> is in the caller code. > > OK, you can point the client as guilty. But that may make your debugging > session more difficult, because you don't know if the client will > actually check the preconditions. > If you don't trust the caller code (such as at API or security boundaries), the callee code can check the preconditions as well. But generally debugging is easiest when you catch the bug as soon as possible (preferably at compile time, or static analysis time - failing that, as soon as practical at runtime). A failed precondition is a bug in client code, so that's where you need to look.
Technical Details
Message-ID:
<11cn3p3$3cl3b$3@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<failure-20261026130433@ram.dialup.fu-berlin.de> <11bnngs$k5tu$1@dont-email.me> <6aee5915$0$998$426a74cc@news.free.fr>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c++ Subject: Re: C++26 failed its DIS ballot. Date: Sat, 7 Nov 2026 12:58:27 +0100 Organization: A noiseless patient Spider Lines: 20 Message-ID: <11cn3p3$3cl3b$3@dont-email.me> References: <failure-20261026130433@ram.dialup.fu-berlin.de> <11bnngs$k5tu$1@dont-email.me> <6aee5915$0$998$426a74cc@news.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 07 Nov 2026 11:58:28 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3560555"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zG6kWtuzU8GFUUB/yd0wlKWhV5UwzZbo="; posting-host="f465dee2b09096cb458f10009f5504bd" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:0vtRe98QUisOiqePH6hyAnQcQ40= sha256:veOOuBw0NT88w+WvqwMRp5eIJZTA6limhsI8kEJgrA0= sha1:vvXau76u5b9+9t8oBOfFXjrQKh4= sha256:p6j7svNrZw1GUPwJVnf8sKtYDNiWxNKqLfw8h9IpVaE= Content-Language: en-GB In-Reply-To: <6aee5915$0$998$426a74cc@news.free.fr>