[llvm-bugs] [Bug 26657] New: __gnu_cxx::hash_map copy constructor is broken

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 17 14:13:20 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26657

            Bug ID: 26657
           Summary: __gnu_cxx::hash_map copy constructor is broken
           Product: libc++
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

#include <ext/hash_map>

__gnu_cxx::hash_map<int, int> h1;
__gnu_cxx::hash_map<int, int> h2(h1);


In file included from ../llvm/4.cc:1:
/code/build-llvm/bin/../include/c++/v1/ext/hash_map:213:5: warning: Use of the
header <ext/hash_map> is deprecated. Migrate to
      <unordered_map> [-W#warnings]
#   warning Use of the header <ext/hash_map> is deprecated.  Migrate to
<unordered_map>
    ^
/code/build-llvm/bin/../include/c++/v1/ext/hash_map:432:57: error:
'__non_const_iterator' is a private member of
     
'std::__1::__hash_const_iterator<std::__1::__hash_node<std::__1::pair<int,
int>, void *> *>'
            __hash_map_iterator<typename _HashIterator::__non_const_iterator>
__i)
                                                        ^
/code/build-llvm/bin/../include/c++/v1/ext/hash_map:659:16: note: in
instantiation of template class
     
'__gnu_cxx::__hash_map_const_iterator<std::__1::__hash_const_iterator<std::__1::__hash_node<std::__1::pair<int,
int>, void
      *> *> >' requested here
    insert(__u.begin(), __u.end());
               ^
../llvm/4.cc:9:31: note: in instantiation of member function
'__gnu_cxx::hash_map<int, int, __gnu_cxx::hash<int>,
      std::__1::equal_to<int>, std::__1::allocator<std::__1::pair<const int,
int> > >::hash_map' requested here
__gnu_cxx::hash_map<int, int> h2(h1);
                              ^
/code/build-llvm/bin/../include/c++/v1/__hash_table:383:39: note: implicitly
declared private here
    typedef __hash_iterator<_NodePtr> __non_const_iterator;
                                      ^
1 warning and 1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160217/5e3a3806/attachment.html>


More information about the llvm-bugs mailing list