]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp23/ext-floating.h
c++: Implement P1467R9 - Extended floating-point types and standard names compiler...
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp23 / ext-floating.h
1 // P1467R9 - Extended floating-point types and standard names.
2
3 namespace std
4 {
5 #ifdef __STDCPP_FLOAT16_T__
6 using float16_t = _Float16;
7 #endif
8 #ifdef __STDCPP_FLOAT32_T__
9 using float32_t = _Float32;
10 #endif
11 #ifdef __STDCPP_FLOAT64_T__
12 using float64_t = _Float64;
13 #endif
14 #ifdef __STDCPP_FLOAT128_T__
15 using float128_t = _Float128;
16 #endif
17 #undef __STDCPP_BFLOAT16_T__
18 #ifdef __STDCPP_BFLOAT16_T__
19 using bfloat16_t = __bf16; // ???
20 #endif
21 template<typename T, T v> struct integral_constant {
22 static constexpr T value = v;
23 };
24 typedef integral_constant<bool, false> false_type;
25 typedef integral_constant<bool, true> true_type;
26 template<class T, class U>
27 struct is_same : std::false_type {};
28 template <class T>
29 struct is_same<T, T> : std::true_type {};
30 }