summaryrefslogtreecommitdiff
path: root/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp')
-rw-r--r--test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp b/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp
index 1d2b18686d0f..64de15c2cd48 100644
--- a/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp
+++ b/test/std/utilities/memory/allocator.traits/allocator.traits.types/propagate_on_container_move_assignment.pass.cpp
@@ -20,6 +20,8 @@
#include <memory>
#include <type_traits>
+#include "test_macros.h"
+
template <class T>
struct A
{
@@ -33,8 +35,21 @@ struct B
typedef T value_type;
};
+
+template <class T>
+struct C
+{
+ typedef T value_type;
+private:
+ typedef std::true_type propagate_on_container_move_assignment;
+};
+
+
int main()
{
static_assert((std::is_same<std::allocator_traits<A<char> >::propagate_on_container_move_assignment, std::true_type>::value), "");
static_assert((std::is_same<std::allocator_traits<B<char> >::propagate_on_container_move_assignment, std::false_type>::value), "");
+#if TEST_STD_VER >= 11
+ static_assert((std::is_same<std::allocator_traits<C<char> >::propagate_on_container_move_assignment, std::false_type>::value), "");
+#endif
}