| 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 |
#ifdef __STDCPP_BFLOAT16_T__ |
| 18 |
using bfloat16_t = decltype (0.0bf16); |
| 19 |
#endif |
| 20 |
template<typename T, T v> struct integral_constant { |
| 21 |
static constexpr T value = v; |
| 22 |
}; |
| 23 |
typedef integral_constant<bool, false> false_type; |
| 24 |
typedef integral_constant<bool, true> true_type; |
| 25 |
template<class T, class U> |
| 26 |
struct is_same : std::false_type {}; |
| 27 |
template <class T> |
| 28 |
struct is_same<T, T> : std::true_type {}; |
| 29 |
} |