This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/48101] obscure error message with std::set<const int>


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,
       ^~~~~~~~~~~~~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]