From 1f508014df7da33d684a5c0cb3c059a675a0aacf Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 7 Apr 2015 05:21:38 +0000 Subject: 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 --- libcxx/include/ext/hash_map | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'libcxx/include/ext') 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 __value_type; typedef __hash_map_hasher<__value_type, hasher> __hasher; typedef __hash_map_equal<__value_type, key_equal> __key_equal; - typedef typename allocator_traits::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, __value_type>::type __allocator_type; typedef __hash_table<__value_type, __hasher, __key_equal, __allocator_type> __table; @@ -772,13 +766,7 @@ private: typedef pair __value_type; typedef __hash_map_hasher<__value_type, hasher> __hasher; typedef __hash_map_equal<__value_type, key_equal> __key_equal; - typedef typename allocator_traits::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, __value_type>::type __allocator_type; typedef __hash_table<__value_type, __hasher, __key_equal, __allocator_type> __table; -- cgit v1.2.3