[Bug libstdc++/48101] obscure error message with std::set<const int>
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 21 20:49:00 GMT 2017
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,
^~~~~~~~~~~~~
More information about the Gcc-bugs
mailing list