C++ Logo

std-proposals

Advanced search

Re: Static Failure - Custom Compile-Time Errors

From: Михаил Найденов <mihailnajdenov_at_[hidden]>
Date: Fri, 18 Jun 2021 19:14:59 +0300
If both are called static_* then it will be odd to be called at different
times.

Assuming we don't want to change how static_assert works, I think this is
better solved by an overload to pick the time of evaluation

static_assert(std::instantiation/lazy/whatever, ...);

It also be interesting if consteval can be used

consteval { assert(...); }

or

consteval(when) { assert(...); }

In any case, this feature seems affected by code injection, so I don't see
a chance for 23

On Fri, Jun 18, 2021 at 4:59 AM David Braun via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> *From:* David Braun
> *Sent:* Thursday, June 17, 2021 12:29 AM
> *To:* lwgchair_at_[hidden]
> *Subject:* C++ 23 Language Proposal for new type of static assertion
>
>
>
> Here is my proposal for C++ 23.
>
> Thank You!
>
>
>
> David Aaron Braun
>
> 519-680-9822
>
> 226-236-4898
>
> da.braun1_at_[hidden]
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2021-06-18 11:15:15