summaryrefslogtreecommitdiffstats
path: root/libcxx/include/list
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-04-07 05:21:38 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-04-07 05:21:38 +0000
commit1f508014df7da33d684a5c0cb3c059a675a0aacf (patch)
treea8102eef2127fe5568b7bac65f9a8e47a2413dfe /libcxx/include/list
parent1c0844bdfbe047770b116bd9fc56b5eefcd60852 (diff)
downloadbcm5719-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/list')
-rw-r--r--libcxx/include/list16
1 files changed, 2 insertions, 14 deletions
diff --git a/libcxx/include/list b/libcxx/include/list
index c1a7a1821c4..d39f076711d 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -515,13 +515,7 @@ protected:
typedef __list_const_iterator<value_type, __void_pointer> const_iterator;
typedef __list_node_base<value_type, __void_pointer> __node_base;
typedef __list_node<value_type, __void_pointer> __node;
- typedef typename __alloc_traits::template
-#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
- rebind_alloc<__node>
-#else
- rebind_alloc<__node>::other
-#endif
- __node_allocator;
+ typedef typename __rebind_alloc_helper<__alloc_traits, __node>::type __node_allocator;
typedef allocator_traits<__node_allocator> __node_alloc_traits;
typedef typename __node_alloc_traits::pointer __node_pointer;
typedef typename __node_alloc_traits::pointer __node_const_pointer;
@@ -529,13 +523,7 @@ protected:
typedef typename __alloc_traits::const_pointer const_pointer;
typedef typename __alloc_traits::difference_type difference_type;
- typedef typename __alloc_traits::template
-#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
- rebind_alloc<__node_base>
-#else
- rebind_alloc<__node_base>::other
-#endif
- __node_base_allocator;
+ typedef typename __rebind_alloc_helper<__alloc_traits, __node_base>::type __node_base_allocator;
typedef typename allocator_traits<__node_base_allocator>::pointer __node_base_pointer;
__node_base __end_;
OpenPOWER on IntegriCloud