[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / language.support / support.limits / limits / numeric.limits.members / is_modulo.pass.cpp
blob962f54c15ade282188e6bd70c94430b14ae86f4e
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 // test numeric_limits
11 // is_modulo
13 #include <limits>
15 #include "test_macros.h"
17 template <class T, bool expected>
18 void
19 test()
21 static_assert(std::numeric_limits<T>::is_modulo == expected, "is_modulo test 1");
22 static_assert(std::numeric_limits<const T>::is_modulo == expected, "is_modulo test 2");
23 static_assert(std::numeric_limits<volatile T>::is_modulo == expected, "is_modulo test 3");
24 static_assert(std::numeric_limits<const volatile T>::is_modulo == expected, "is_modulo test 4");
27 int main(int, char**)
29 test<bool, false>();
30 // test<char, false>(); // don't know
31 test<signed char, false>();
32 test<unsigned char, true>();
33 // test<wchar_t, false>(); // don't know
34 #if TEST_STD_VER > 17 && defined(__cpp_char8_t)
35 test<char8_t, true>();
36 #endif
37 test<char16_t, true>();
38 test<char32_t, true>();
39 test<short, false>();
40 test<unsigned short, true>();
41 test<int, false>();
42 test<unsigned int, true>();
43 test<long, false>();
44 test<unsigned long, true>();
45 test<long long, false>();
46 test<unsigned long long, true>();
47 #ifndef TEST_HAS_NO_INT128
48 test<__int128_t, false>();
49 test<__uint128_t, true>();
50 #endif
51 test<float, false>();
52 test<double, false>();
53 test<long double, false>();
55 return 0;