Date: Wed, 19 Aug 2026 15:26:15 +0200
On 8/19/26 05:37, Ville Voutilainen via Std-Proposals wrote:
> On Wed, 19 Aug 2026 at 05:54, Sebastian Wittmeier via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>>
>> If P2900 is staying, can you define (= propose) a 5th mode that acts like compile_assert and also hope that the implementations give better error messages and locations than an undefined violation handler?
>
> I don't know about others, but yes, yes I can: https://godbolt.org/z/xPz8hjcYY
I don't see the precondition violation. `use_definitely_unsound` is a
perfectly fine function for getting a -1 so long as its implicit
precondition of not passing in a vector of exactly 5 elements is met.
Nothing in the program violates this implicit precondition.
Implicit preconditions still exist, right? There is no way to encode
every precondition into something the compiler understands.
> On Wed, 19 Aug 2026 at 05:54, Sebastian Wittmeier via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>>
>> If P2900 is staying, can you define (= propose) a 5th mode that acts like compile_assert and also hope that the implementations give better error messages and locations than an undefined violation handler?
>
> I don't know about others, but yes, yes I can: https://godbolt.org/z/xPz8hjcYY
I don't see the precondition violation. `use_definitely_unsound` is a
perfectly fine function for getting a -1 so long as its implicit
precondition of not passing in a vector of exactly 5 elements is met.
Nothing in the program violates this implicit precondition.
Implicit preconditions still exist, right? There is no way to encode
every precondition into something the compiler understands.
-- Rainer Deyke - rainerd_at_[hidden]
Received on 2026-08-19 13:26:25
