1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <list>
11 
12 // template <class T, class Alloc = allocator<T> >
13 // class list
14 // {
15 // public:
16 //
17 //     // types:
18 //     typedef T value_type;
19 //     typedef Alloc allocator_type;
20 //     typedef typename allocator_type::reference reference;
21 //     typedef typename allocator_type::const_reference const_reference;
22 //     typedef typename allocator_type::pointer pointer;
23 //     typedef typename allocator_type::const_pointer const_pointer;
24 
25 #include <list>
26 #include <type_traits>
27 
28 #include "../../min_allocator.h"
29 
30 int main()
31 {
32     static_assert((std::is_same<std::list<int>::value_type, int>::value), "");
33     static_assert((std::is_same<std::list<int>::allocator_type, std::allocator<int> >::value), "");
34     static_assert((std::is_same<std::list<int>::reference, std::allocator<int>::reference>::value), "");
35     static_assert((std::is_same<std::list<int>::const_reference, std::allocator<int>::const_reference>::value), "");
36     static_assert((std::is_same<std::list<int>::pointer, std::allocator<int>::pointer>::value), "");
37     static_assert((std::is_same<std::list<int>::const_pointer, std::allocator<int>::const_pointer>::value), "");
38 #if __cplusplus >= 201103L
39     static_assert((std::is_same<std::list<int, min_allocator<int>>::value_type, int>::value), "");
40     static_assert((std::is_same<std::list<int, min_allocator<int>>::allocator_type, min_allocator<int> >::value), "");
41     static_assert((std::is_same<std::list<int, min_allocator<int>>::reference, int&>::value), "");
42     static_assert((std::is_same<std::list<int, min_allocator<int>>::const_reference, const int&>::value), "");
43     static_assert((std::is_same<std::list<int, min_allocator<int>>::pointer, min_pointer<int>>::value), "");
44     static_assert((std::is_same<std::list<int, min_allocator<int>>::const_pointer, min_pointer<const int>>::value), "");
45 #endif
46 }
47