This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/48101] obscure error message with std::set<const int>
- 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: Tue, 21 Nov 2017 20:49:19 +0000
- Subject: [Bug libstdc++/48101] obscure error message with std::set<const int>
- Auto-submitted: auto-generated
- References: <bug-48101-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48101
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |8.0
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Gaby's original testcase now prints simply:
In file included from /home/jwakely/gcc/8/include/c++/8.0.0/set:61:0,
from const.cc:1:
/home/jwakely/gcc/8/include/c++/8.0.0/bits/stl_set.h: In instantiation of
‘class std::set<const int>’:
const.cc:4:23: required from here
/home/jwakely/gcc/8/include/c++/8.0.0/bits/stl_set.h:108:7: error: static
assertion failed: std::set must have a non-const, non-volatile value_type
static_assert(is_same<typename remove_cv<_Key>::type, _Key>::value,
^~~~~~~~~~~~~