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 // <forward_list> 11 12 // explicit forward_list(const allocator_type& a); 13 14 #include <forward_list> 15 #include <cassert> 16 17 #include "test_allocator.h" 18 #include "../../../NotConstructible.h" 19 20 int main() 21 { 22 { 23 typedef test_allocator<NotConstructible> A; 24 typedef A::value_type T; 25 typedef std::forward_list<T, A> C; 26 C c = A(12); 27 assert(c.get_allocator() == A(12)); 28 assert(c.empty()); 29 } 30 } 31