https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> --- (In reply to Jonathan Wakely from comment #2) > Another way to implement the __unspec constructor would be: > > consteval __unspec(int __n) { if (__n != 0) throw __n; } > > But I think I discussed this with Richard Smith in Prague and we realised > there was a problem with it, but I might be misremembering. Remember that we need to ensure that this __unspec constructor needs to be noexcept (See bug 94565), so this function could only do a terminate-like action.