This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/72745] Please static assert in std::get to check out of range
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 31 Jul 2016 14:13:53 +0000
- Subject: [Bug libstdc++/72745] Please static assert in std::get to check out of range
- Auto-submitted: auto-generated
- References: <bug-72745-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72745
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is harder than you think, because the incomplete type error happens in the
return type, so the function body is never instantiated and adding a static
assertion there doesn't help.