[llvm-bugs] [Bug 32096] New: unordered_set<std::pair<int, int>> initialiser list constructor.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 28 14:05:34 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=32096
Bug ID: 32096
Summary: unordered_set<std::pair<int, int>> initialiser list
constructor.
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: denis.yaroshevskij at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
Created attachment 18034
--> https://bugs.llvm.org/attachment.cgi?id=18034&action=edit
code
Attached code fails to compile for unordered set and works for other standard
containers.
Seems like a bug.
Error message:
clang++ --std=c++11 ~/unordered_set_bug.cc
In file included from /Users/dyaroshev/unordered_set_bug.cc:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_set:323:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:16:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:599:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:1008:38:
error: implicit instantiation of undefined
template 'std::__1::hash<std::__1::pair<int, int> >'
: public integral_constant<bool, __is_empty(_Tp)> {};
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2008:40:
note: in instantiation of template class
'std::__1::is_empty<std::__1::hash<std::__1::pair<int, int> > >'
requested here
bool = is_empty<_T2>::value
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2028:44:
note: in instantiation of default argument for
'__libcpp_compressed_pair_switch<unsigned long,
std::__1::hash<std::__1::pair<int, int> >, false, false>' required here
template <class _T1, class _T2, unsigned = __libcpp_compressed_pair_switch<_T1,
_T2>::value>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2396:15:
note: in instantiation of default argument for
'__libcpp_compressed_pair_imp<unsigned long,
std::__1::hash<std::__1::pair<int, int> > >' required here
: private __libcpp_compressed_pair_imp<_T1, _T2>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:969:59:
note: in instantiation of template class
'std::__1::__compressed_pair<unsigned long,
std::__1::hash<std::__1::pair<int, int> > >' requested here
__compressed_pair<size_type, hasher> __p2_;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_set:353:13:
note: in instantiation of template class
'std::__1::__hash_table<std::__1::pair<int, int>,
std::__1::hash<std::__1::pair<int, int> >,
std::__1::equal_to<std::__1::pair<int, int> >,
std::__1::allocator<std::__1::pair<int, int> > >' requested here
__table __table_;
^
/Users/dyaroshev/unordered_set_bug.cc:8:15: note: in instantiation of template
class 'std::__1::unordered_set<std::__1::pair<int, int>,
std::__1::hash<std::__1::pair<int, int> >,
std::__1::equal_to<std::__1::pair<int, int> >,
std::__1::allocator<std::__1::pair<int, int> > >' requested here
Container input;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3159:29:
note: template is declared here
template <class _Tp> struct hash;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2008:55:
error: no member named 'value' in
'std::__1::is_empty<std::__1::hash<std::__1::pair<int, int> > >'
bool = is_empty<_T2>::value
~~~~~~~~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2028:44:
note: in instantiation of default argument for
'__libcpp_compressed_pair_switch<unsigned long,
std::__1::hash<std::__1::pair<int, int> >, false, false>' required here
template <class _T1, class _T2, unsigned = __libcpp_compressed_pair_switch<_T1,
_T2>::value>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2398:13:
note: in instantiation of default argument for
'__libcpp_compressed_pair_imp<unsigned long,
std::__1::hash<std::__1::pair<int, int> > >' required here
typedef __libcpp_compressed_pair_imp<_T1, _T2> base;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:969:59:
note: in instantiation of template class
'std::__1::__compressed_pair<unsigned long,
std::__1::hash<std::__1::pair<int, int> > >' requested here
__compressed_pair<size_type, hasher> __p2_;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_set:353:13:
note: in instantiation of template class
'std::__1::__hash_table<std::__1::pair<int, int>,
std::__1::hash<std::__1::pair<int, int> >,
std::__1::equal_to<std::__1::pair<int, int> >,
std::__1::allocator<std::__1::pair<int, int> > >' requested here
__table __table_;
^
/Users/dyaroshev/unordered_set_bug.cc:8:15: note: in instantiation of template
class 'std::__1::unordered_set<std::__1::pair<int, int>,
std::__1::hash<std::__1::pair<int, int> >,
std::__1::equal_to<std::__1::pair<int, int> >,
std::__1::allocator<std::__1::pair<int, int> > >' requested here
Container input;
^
In file included from /Users/dyaroshev/unordered_set_bug.cc:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_set:323:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:16:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2412:40:
error: multiple overloads of '__compressed_pair'
instantiate to the same signature 'void (_T2_param)' (aka 'void (int)')
_LIBCPP_INLINE_VISIBILITY explicit __compressed_pair(_T2_param __t2)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:969:59:
note: in instantiation of template class
'std::__1::__compressed_pair<unsigned long,
std::__1::hash<std::__1::pair<int, int> > >' requested here
__compressed_pair<size_type, hasher> __p2_;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_set:353:13:
note: in instantiation of template class
'std::__1::__hash_table<std::__1::pair<int, int>,
std::__1::hash<std::__1::pair<int, int> >,
std::__1::equal_to<std::__1::pair<int, int> >,
std::__1::allocator<std::__1::pair<int, int> > >' requested here
__table __table_;
^
/Users/dyaroshev/unordered_set_bug.cc:8:15: note: in instantiation of template
class 'std::__1::unordered_set<std::__1::pair<int, int>,
std::__1::hash<std::__1::pair<int, int> >,
std::__1::equal_to<std::__1::pair<int, int> >,
std::__1::allocator<std::__1::pair<int, int> > >' requested here
Container input;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2410:40:
note: previous declaration is here
_LIBCPP_INLINE_VISIBILITY explicit __compressed_pair(_T1_param __t1)
^
3 errors 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/20170228/f1393569/attachment.html>
More information about the llvm-bugs
mailing list