diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-07-01 21:23:40 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-07-01 21:23:40 +0000 |
commit | f43a42d53e21e5860217ede634f8eea6d25d3a18 (patch) | |
tree | e50882487d6bd172583eb9d2301012d2cb76baf7 /libcxx/test | |
parent | acfd55b039f8bc29b34dd9df89c71f7183793269 (diff) | |
download | bcm5719-llvm-f43a42d53e21e5860217ede634f8eea6d25d3a18.tar.gz bcm5719-llvm-f43a42d53e21e5860217ede634f8eea6d25d3a18.zip |
Noticed that std::allocator<const T> was missing the definition for is_always_equal. Fixed this, and added a test for it.
llvm-svn: 241190
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp | 4 | ||||
-rw-r--r-- | libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp | 5 |
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; |