summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/memory
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities/memory')
-rw-r--r--libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp4
-rw-r--r--libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp5
2 files changed, 9 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp
index 927736cf140..31a0f171d33 100644
--- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp
+++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp
@@ -45,4 +45,8 @@ int main()
static_assert((std::is_same<std::allocator_traits<A<char> >::is_always_equal, std::true_type>::value), "");
static_assert((std::is_same<std::allocator_traits<B<char> >::is_always_equal, std::true_type>::value), "");
static_assert((std::is_same<std::allocator_traits<C<char> >::is_always_equal, std::false_type>::value), "");
+
+ static_assert((std::is_same<std::allocator_traits<A<const char> >::is_always_equal, std::true_type>::value), "");
+ static_assert((std::is_same<std::allocator_traits<B<const char> >::is_always_equal, std::true_type>::value), "");
+ static_assert((std::is_same<std::allocator_traits<C<const char> >::is_always_equal, std::false_type>::value), "");
}
diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
index db08123a3e5..cba32103dcd 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
@@ -22,6 +22,7 @@
// typedef typename add_lvalue_reference<T>::type reference;
// typedef typename add_lvalue_reference<const T>::type const_reference;
// typedef T value_type;
+// typedef true_type is_always_equal;
//
// template <class U> struct rebind {typedef allocator<U> other;};
// ...
@@ -42,6 +43,10 @@ int main()
static_assert((std::is_same<std::allocator<char>::const_reference, const char&>::value), "");
static_assert((std::is_same<std::allocator<char>::rebind<int>::other,
std::allocator<int> >::value), "");
+
+ static_assert((std::is_same<std::allocator< char>::is_always_equal, std::true_type>::value), "");
+ static_assert((std::is_same<std::allocator<const char>::is_always_equal, std::true_type>::value), "");
+
std::allocator<char> a;
std::allocator<char> a2 = a;
a2 = a;
OpenPOWER on IntegriCloud