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 //===----------------------------------------------------------------------===//
14 #include <type_traits>
17 #include "test_macros.h"
19 TEST_CONSTEXPR_CXX20
bool test() {
20 std::vector
<bool> vec
;
21 typedef std::vector
<bool>::reference Ref
;
22 static_assert(std::is_convertible
<Ref
, bool>::value
, "");
26 Ref true_ref
= vec
[0];
27 Ref false_ref
= vec
[1];
36 int main(int, char**) {
39 static_assert(test());