summaryrefslogtreecommitdiffstats
path: root/libcxx/include/vector
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-05-07 16:50:38 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-05-07 16:50:38 +0000
commit0ae9efeb1a14a665a0f5d6819e25a83cc6ea348a (patch)
tree58e9ae0b2d978910d723a7c8b2ca8d3bb5fb2ca2 /libcxx/include/vector
parentbcaa94db6c4018314cf2f050711a35e9afac8cb8 (diff)
downloadbcm5719-llvm-0ae9efeb1a14a665a0f5d6819e25a83cc6ea348a.tar.gz
bcm5719-llvm-0ae9efeb1a14a665a0f5d6819e25a83cc6ea348a.zip
SFINAE __bit_iterator such that it will only get instantiated with a container that has the nested type __storage_type. This prevents accidental instantiation such as in http://llvm.org/bugs/show_bug.cgi?id=12755. This fixes http://llvm.org/bugs/show_bug.cgi?id=12755.
llvm-svn: 156308
Diffstat (limited to 'libcxx/include/vector')
-rw-r--r--libcxx/include/vector2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector
index 61f0aef748f..0d5b6b8b66d 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -1970,6 +1970,7 @@ public:
typedef allocator_traits<allocator_type> __alloc_traits;
typedef typename __alloc_traits::size_type size_type;
typedef typename __alloc_traits::difference_type difference_type;
+ typedef size_type __storage_type;
typedef __bit_iterator<vector, false> pointer;
typedef __bit_iterator<vector, true> const_pointer;
#ifdef _LIBCPP_DEBUG
@@ -1991,7 +1992,6 @@ public:
typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
private:
- typedef size_type __storage_type;
typedef typename __alloc_traits::template
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
rebind_alloc<__storage_type>
OpenPOWER on IntegriCloud