Not Enough Math
Lightweight zero-dependency C++ math library
Loading...
Searching...
No Matches
nan.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <concepts>
4
#include <limits>
5
6
#include "
config.hpp
"
7
8
namespace
nem
9
{
10
template
<
typename
T>
11
concept
CanBeNaN
= std::floating_point<T> ||
12
(
requires
13
{
14
{ std::numeric_limits<T>::has_quiet_NaN } -> std::convertible_to<bool>;
15
requires
std::numeric_limits<T>::has_quiet_NaN;
16
}
17
);
18
19
template
<
typename
T>
20
concept
CanBeNaNIfConfig
= std::conditional_t<
21
ERR_USE_NAN
,
22
std::bool_constant<CanBeNaN<T>>,
23
std::true_type
24
>::value;
25
}
nem::CanBeNaNIfConfig
Definition
nan.hpp:20
nem::CanBeNaN
Definition
nan.hpp:11
config.hpp
nem
Definition
config.hpp:16
nem::ERR_USE_NAN
constexpr bool ERR_USE_NAN
Definition
config.hpp:30
nem
include
nan.hpp
Generated by
1.12.0