blob: 1d2b18686d0f1153ceec03258e72851aff8e8197 [file] [log] [blame]
Howard Hinnantc52f43e2010-08-22 00:59:46 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantc52f43e2010-08-22 00:59:46 +00007//
8//===----------------------------------------------------------------------===//
9
10// <memory>
11
12// template <class Alloc>
13// struct allocator_traits
14// {
15// typedef Alloc::propagate_on_container_move_assignment
16// | false_type propagate_on_container_move_assignment;
17// ...
18// };
19
20#include <memory>
21#include <type_traits>
22
23template <class T>
24struct A
25{
26 typedef T value_type;
27 typedef std::true_type propagate_on_container_move_assignment;
28};
29
30template <class T>
31struct B
32{
33 typedef T value_type;
34};
35
36int main()
37{
38 static_assert((std::is_same<std::allocator_traits<A<char> >::propagate_on_container_move_assignment, std::true_type>::value), "");
39 static_assert((std::is_same<std::allocator_traits<B<char> >::propagate_on_container_move_assignment, std::false_type>::value), "");
40}