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> operator|(const bitset<N>& lhs, const bitset<N>& rhs);
16 #if defined(__clang__)
17 #pragma clang diagnostic ignored "-Wtautological-compare"
20 template <std::size_t N>
25 for (std::size_t i = 0; i < N; ++i)
26 v[i] = static_cast<bool>(std::rand() & 1);
30 template <std::size_t N>
33 std::bitset<N> v1 = make_bitset<N>();
34 std::bitset<N> v2 = make_bitset<N>();
35 std::bitset<N> v3 = v1;
36 assert((v1 | v2) == (v3 |= v2));