1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
13 // noexcept(is_nothrow_default_constructible<allocator_type>::value);
15 // This tests a conforming extension
17 // UNSUPPORTED: c++98, c++03
22 #include "test_macros.h"
23 #include "test_allocator.h"
29 some_alloc(const some_alloc&);
34 #if defined(_LIBCPP_VERSION)
36 typedef std::vector<bool> C;
37 static_assert(std::is_nothrow_default_constructible<C>::value, "");
40 typedef std::vector<bool, test_allocator<bool>> C;
41 static_assert(std::is_nothrow_default_constructible<C>::value, "");
43 #endif // _LIBCPP_VERSION
45 typedef std::vector<bool, other_allocator<bool>> C;
46 static_assert(!std::is_nothrow_default_constructible<C>::value, "");
49 typedef std::vector<bool, some_alloc<bool>> C;
50 static_assert(!std::is_nothrow_default_constructible<C>::value, "");