1 // { dg-options "-std=gnu++11" }
4 // Copyright (C) 2012-2013 Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
23 #include <type_traits>
25 // Check std::allocator for required typedefs.
30 static_assert( is_same<allocator<int>::size_type, std::size_t>::value,
32 static_assert( is_same<allocator<int>::difference_type, std::ptrdiff_t>::value,
34 static_assert( is_same<allocator<int>::pointer, int*>::value,
36 static_assert( is_same<allocator<int>::const_pointer, const int*>::value,
38 static_assert( is_same<allocator<int>::reference, int&>::value,
40 static_assert( is_same<allocator<int>::const_reference, const int&>::value,
42 static_assert( is_same<allocator<int>::value_type, int>::value,
45 static_assert( is_same<allocator<int>::rebind<char>::other,
46 allocator<char>>::value,
49 static_assert( is_same<allocator<int>::propagate_on_container_move_assignment,
50 std::true_type>::value,
51 "propagate_on_container_move_assignment" );