[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927)
[llvm-project.git] / libcxx / test / std / concepts / concepts.lang / concepts.arithmetic / arithmetic.h
blobde2f5399ec700cccbdad24db5c60b6281ec813b4
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 #ifndef LIBCXX_TEST_CONCEPTS_LANG_CONCEPTS_ARITHMETIC_H_
10 #define LIBCXX_TEST_CONCEPTS_LANG_CONCEPTS_ARITHMETIC_H_
12 #include <concepts>
14 // This overload should never be called. It exists solely to force subsumption.
15 template <std::integral I>
16 constexpr bool CheckSubsumption(I) {
17 return false;
20 // clang-format off
21 template <std::integral I>
22 requires std::signed_integral<I> && (!std::unsigned_integral<I>)
23 constexpr bool CheckSubsumption(I) {
24 return std::is_signed_v<I>;
27 template <std::integral I>
28 requires std::unsigned_integral<I> && (!std::signed_integral<I>)
29 constexpr bool CheckSubsumption(I) {
30 return std::is_unsigned_v<I>;
32 // clang-format on
34 enum ClassicEnum { a, b, c };
35 enum class ScopedEnum { x, y, z };
36 struct EmptyStruct {};
38 #endif // LIBCXX_TEST_CONCEPTS_LANG_CONCEPTS_ARITHMETIC_H_