Date: Mon, 05 Dec 2022 14:58:23 +0100
Am Mo., 5. Dez. 2022 um 12:06 Uhr schrieb Tobias Loew via
Std-Discussion <std-discussion_at_[hidden]>:
>
> Trying to create a pair / tuple with types, which have only consteval
> constructors, currently results in an error “'this' is not a constant
> expression” (on gcc).
> (Example: https://godbolt.org/z/fY86TaKev)
> It would compile, if consexpr constructors would be aware of being
> invoked on a consexpr instance and then behave like a consteval
> constructor.
> Otherwise there is currently no way to create pairs or tuples with
> consteval-only constructible types.
Yes, consteval is currently invasive. There exist a proposal that
might fix your problem, see
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2564r3.html
This paper has just been accepted at the Konar meeting.
- Daniel
Received on 2022-12-05 13:58:35