https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
Jason Merrill changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
--- Comment #6 from Jonathan Wakely ---
It was just a sketch to show the idea.
Obviously the real thing would need noexcept, but we have a regression test for
that. How to construct it is what's relevant here.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
--- Comment #5 from Daniel Krügler ---
(In reply to Jonathan Wakely from comment #4)
> It's consteval, the throw is there to make it not a constant expression and
> give an error if anything except 0 is used. i.e. it can never throw, it
> either
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
--- Comment #4 from Jonathan Wakely ---
It's consteval, the throw is there to make it not a constant expression and
give an error if anything except 0 is used. i.e. it can never throw, it either
compiles or it doesn't.
But I've remembered the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
--- Comment #3 from Daniel Krügler ---
(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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
--- Comment #2 from Jonathan Wakely ---
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
Jason Merrill changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95242
Richard Biener changed:
What|Removed |Added
Known to work||9.3.0
Keywords|