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 //===----------------------------------------------------------------------===//
11 // bool operator==(const bitset<N>& rhs) const; // constexpr since C++23
12 // bool operator!=(const bitset<N>& rhs) const; // constexpr since C++23
19 #include "../bitset_test_cases.h"
20 #include "test_macros.h"
22 template <std::size_t N
>
23 TEST_CONSTEXPR_CXX23
void test_equality() {
24 std::vector
<std::bitset
<N
> > const cases
= get_test_cases
<N
>();
25 for (std::size_t c
= 0; c
!= cases
.size(); ++c
) {
26 std::bitset
<N
> const v1
= cases
[c
];
27 std::bitset
<N
> v2
= v1
;
36 TEST_CONSTEXPR_CXX23
bool test() {
49 int main(int, char**) {
51 test_equality
<1000>(); // not in constexpr because of constexpr evaluation step limits
53 static_assert(test());