From: Eric Fiselier Date: Sat, 20 Feb 2016 07:59:16 +0000 (+0000) Subject: Rename <__hash_table> traits so they don't conflict with similar traits. X-Git-Tag: llvmorg-3.9.0-rc1~13665 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43b121df05b2e0c621452dddcb8f553468d59c53;p=platform%2Fupstream%2Fllvm.git Rename <__hash_table> traits so they don't conflict with similar traits. In particular <__tree> defines many of the same types of traits classes. llvm-svn: 261421 --- diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table index 87709a3..e8cebe0 100644 --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -110,7 +110,7 @@ template class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator; template class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator; template -struct __key_value_types { +struct __hash_key_value_types { static_assert(!is_reference<_Tp>::value && !is_const<_Tp>::value, ""); typedef _Tp key_type; typedef _Tp __node_value_type; @@ -138,7 +138,7 @@ struct __key_value_types { }; template -struct __key_value_types<__hash_value_type<_Key, _Tp> > { +struct __hash_key_value_types<__hash_value_type<_Key, _Tp> > { typedef _Key key_type; typedef _Tp mapped_type; typedef __hash_value_type<_Key, _Tp> __node_value_type; @@ -181,12 +181,12 @@ struct __key_value_types<__hash_value_type<_Key, _Tp> > { }; -template , +template , bool = _KVTypes::__is_map> -struct __map_pointer_types {}; +struct __hash_map_pointer_types {}; template -struct __map_pointer_types<_Tp, _AllocPtr, _KVTypes, true> { +struct __hash_map_pointer_types<_Tp, _AllocPtr, _KVTypes, true> { typedef typename _KVTypes::__map_value_type _Mv; typedef typename __rebind_pointer<_AllocPtr, _Mv>::type __map_value_type_pointer; @@ -199,10 +199,10 @@ struct __hash_node_types; template struct __hash_node_types<_NodePtr, __hash_node<_Tp, _VoidPtr> > - : public __key_value_types<_Tp>, __map_pointer_types<_Tp, _VoidPtr> + : public __hash_key_value_types<_Tp>, __hash_map_pointer_types<_Tp, _VoidPtr> { - typedef __key_value_types<_Tp> __base; + typedef __hash_key_value_types<_Tp> __base; public: typedef ptrdiff_t difference_type; diff --git a/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp b/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp index 0df2590..a6d1ea7a 100644 --- a/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/key_value_traits.pass.cpp @@ -18,7 +18,7 @@ void testKeyValueTrait() { { typedef int Tp; - typedef std::__key_value_types Traits; + typedef std::__hash_key_value_types Traits; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -26,7 +26,7 @@ void testKeyValueTrait() { } { typedef std::pair Tp; - typedef std::__key_value_types Traits; + typedef std::__hash_key_value_types Traits; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -34,7 +34,7 @@ void testKeyValueTrait() { } { typedef std::pair Tp; - typedef std::__key_value_types Traits; + typedef std::__hash_key_value_types Traits; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -42,7 +42,7 @@ void testKeyValueTrait() { } { typedef std::__hash_value_type Tp; - typedef std::__key_value_types Traits; + typedef std::__hash_key_value_types Traits; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), "");