C++ Logo


Advanced search

Re: Seeking a better constexpr

From: Andrew Schepler <aschepler_at_[hidden]>
Date: Mon, 14 Oct 2019 08:09:49 -0400
On Mon, Oct 14, 2019 at 12:58 AM Jeremy Ong via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> - Proposal: introduce a new function signature decorator called
> `consteval` (in the spirit of the variable consteval decorator) which is an
> input into overload resolution.

The draft `consteval` is already a function specifier and is not a variable
specifier. I haven't looked at it in detail, but I think it does much of
what you want, except overloading and allowing non-constexpr calls.
Basically, it demands the evaluation of every call to the function must
happen at compile time.

Received on 2019-10-14 07:12:15