diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-04-07 05:21:38 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-04-07 05:21:38 +0000 |
commit | 1f508014df7da33d684a5c0cb3c059a675a0aacf (patch) | |
tree | a8102eef2127fe5568b7bac65f9a8e47a2413dfe /libcxx/include/ext | |
parent | 1c0844bdfbe047770b116bd9fc56b5eefcd60852 (diff) | |
download | bcm5719-llvm-1f508014df7da33d684a5c0cb3c059a675a0aacf.tar.gz bcm5719-llvm-1f508014df7da33d684a5c0cb3c059a675a0aacf.zip |
In many places, there was an #ifdef/#else block that selected one of two implmentations of rebind_alloc based on whether or not we had template aliases. Create a helper struct to encapsulate that bit of logic, and replace all the ifdefs with uses of that struct. No functionality change intented.
llvm-svn: 234296
Diffstat (limited to 'libcxx/include/ext')
-rw-r--r-- | libcxx/include/ext/hash_map | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map index 36cd595e034..d8fc1e6c03c 100644 --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -493,13 +493,7 @@ private: typedef pair<key_type, mapped_type> __value_type; typedef __hash_map_hasher<__value_type, hasher> __hasher; typedef __hash_map_equal<__value_type, key_equal> __key_equal; - typedef typename allocator_traits<allocator_type>::template -#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES - rebind_alloc<__value_type> -#else - rebind_alloc<__value_type>::other -#endif - __allocator_type; + typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>, __value_type>::type __allocator_type; typedef __hash_table<__value_type, __hasher, __key_equal, __allocator_type> __table; @@ -772,13 +766,7 @@ private: typedef pair<key_type, mapped_type> __value_type; typedef __hash_map_hasher<__value_type, hasher> __hasher; typedef __hash_map_equal<__value_type, key_equal> __key_equal; - typedef typename allocator_traits<allocator_type>::template -#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES - rebind_alloc<__value_type> -#else - rebind_alloc<__value_type>::other -#endif - __allocator_type; + typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>, __value_type>::type __allocator_type; typedef __hash_table<__value_type, __hasher, __key_equal, __allocator_type> __table; |