[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / utilities / function.objects / bitwise.operations / transparent.pass.cpp
blobe70956a4e3f5334a4932f2610205473429daf66b
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11
10 #include <functional>
11 #include <string>
13 #include "test_macros.h"
15 template <class T>
16 struct is_transparent
18 private:
19 struct two {char lx; char lxx;};
20 template <class U> static two test(...);
21 template <class U> static char test(typename U::is_transparent* = 0);
22 public:
23 static const bool value = sizeof(test<T>(0)) == 1;
27 int main(int, char**) {
28 static_assert ( !is_transparent<std::bit_and<int>>::value, "" );
29 static_assert ( !is_transparent<std::bit_and<std::string>>::value, "" );
30 static_assert ( is_transparent<std::bit_and<void>>::value, "" );
31 static_assert ( is_transparent<std::bit_and<>>::value, "" );
33 static_assert ( !is_transparent<std::bit_or<int>>::value, "" );
34 static_assert ( !is_transparent<std::bit_or<std::string>>::value, "" );
35 static_assert ( is_transparent<std::bit_or<void>>::value, "" );
36 static_assert ( is_transparent<std::bit_or<>>::value, "" );
38 static_assert ( !is_transparent<std::bit_xor<int>>::value, "" );
39 static_assert ( !is_transparent<std::bit_xor<std::string>>::value, "" );
40 static_assert ( is_transparent<std::bit_xor<void>>::value, "" );
41 static_assert ( is_transparent<std::bit_xor<>>::value, "" );
43 static_assert ( !is_transparent<std::bit_not<int>>::value, "" );
44 static_assert ( !is_transparent<std::bit_not<std::string>>::value, "" );
45 static_assert ( is_transparent<std::bit_not<void>>::value, "" );
46 static_assert ( is_transparent<std::bit_not<>>::value, "" );
48 return 0;