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 //===----------------------------------------------------------------------===//
9 // bool any() const; // constexpr since C++23
15 #include "test_macros.h"
17 template <std::size_t N
>
18 TEST_CONSTEXPR_CXX23
void test_any() {
21 assert(v
.any() == false);
23 assert(v
.any() == (N
!= 0));
26 assert(v
.any() == true);
29 assert(v
.any() == true);
33 TEST_CONSTEXPR_CXX23
bool test() {
47 int main(int, char**) {
50 static_assert(test());