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 c++/80858] When trying to copy std::unordered_map illegally, error message doesn't tell what's wrong


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80858

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, that's great, thanks.

As you observed, Clang doesn't indicate the location that triggers the invalid
instantiation, but EDG does, correctly pointing to line 22:

"um2.cc", line 9: error: no suitable constructor exists to convert from "int"
          to "Empty"
                  T t(3);
                      ^
          detected during:
            instantiation of "A<T> &A<T>::operator=(const A<T> &) [with
                      T=Empty]" at line 22
            implicit generation of "B &B::operator=(const B &)" at line 22

1 error detected in the compilation of "um2.cc".

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