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 #ifndef LIBCXX_TEST_CONCEPTS_LANG_CONCEPTS_ARITHMETIC_H_
10 #define LIBCXX_TEST_CONCEPTS_LANG_CONCEPTS_ARITHMETIC_H_
14 // This overload should never be called. It exists solely to force subsumption.
15 template <std::integral I
>
16 constexpr bool CheckSubsumption(I
) {
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
>;
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_