1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 // static void swap(reference x, reference y) noexcept;
17 #include "test_macros.h"
22 bool a
[] = {false, true, false, true};
23 bool* an
= a
+ sizeof(a
)/sizeof(a
[0]);
25 std::vector
<bool> v(a
, an
);
26 std::vector
<bool>::reference r1
= v
[0];
27 std::vector
<bool>::reference r2
= v
[3];
29 #if TEST_STD_VER >= 11
30 static_assert((noexcept(v
.swap(r1
,r2
))), "");