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 //===----------------------------------------------------------------------===//
10 // test bitset<N>& set(size_t pos, bool val = true);
15 #include "test_macros.h"
17 template <std::size_t N>
18 void test_set_one(bool test_throws)
21 #ifdef TEST_HAS_NO_EXCEPTIONS
22 if (test_throws) return;
33 #ifndef TEST_HAS_NO_EXCEPTIONS
34 catch (std::out_of_range&)
47 #ifndef TEST_HAS_NO_EXCEPTIONS
48 catch (std::out_of_range&)
57 test_set_one<0>(true);
58 test_set_one<1>(true);
59 test_set_one<31>(true);
60 test_set_one<32>(true);
61 test_set_one<33>(true);
62 test_set_one<63>(false);
63 test_set_one<64>(false);
64 test_set_one<65>(false);
65 test_set_one<1000>(false);