C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::terminate_compilation

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Fri, 19 May 2023 12:34:15 +0200
The current csnonical way is to use an static_assert with an always_false template with the types as template parameters. It is also mentioned in this paper as workaround. -----Urspr√ľngliche Nachricht----- Von:Pavel Vazharov via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Fr 19.05.2023 12:29 Betreff:Re: [std-proposals] std::terminate_compilation An:std-proposals_at_[hidden]; CC:Pavel Vazharov <freakpv_at_[hidden]>; if constexpr ( .... ) { . . . } else if constexpr ( ... ) { . . . } else { std::terminate_compilation(); } I think this proposal covers the above case https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2593r0.html -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2023-05-19 10:34:17