ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::base::math::arithmetic_type_info_prover< T > 模板结构体 参考

算术类型帮助类型 任何后续定义的新算术类型都可以重载这些类型来实现数学库的泛型支持 更多...

Public 类型

using unsigned_type = decltype(λ{ if constexpr(type_info< T >==type_info< bool >) return T()
 
using signed_type = decltype(λ{ if constexpr(type_info< T >==type_info< bool >) return T()
 
using float_type = decltype(λ{ if constexpr(is_float_type) return T()
 
using integer_type = decltype(λ{ if constexpr(is_integer_type) return T()
 

Public 成员函数

else if constexpr (is_float_type) return T()
 
else if constexpr ())
 
else if constexpr (is_float_type) return T()
 
else if constexpr ())
 
else if constexpr (is_integer_type) return .0
 
else if constexpr (is_float_type) return 0
 

静态 Public 成员函数

static constexpr auto quiet_NaN () noexcept
 
static constexpr auto signaling_NaN () noexcept
 
static constexpr auto NaN () noexcept
 
static constexpr auto Inf () noexcept
 
static constexpr auto negative_Inf () noexcept
 
static constexpr auto min () noexcept
 
static constexpr auto max () noexcept
 
static constexpr auto ε () noexcept
 

静态 Public 属性

static constexpr bool is_arithmetic_type =::std::is_arithmetic_v<T> || is_elc_expansion_base_type<T>
 
static constexpr bool is_basic_type =::std::is_arithmetic_v<T>
 
static constexpr bool is_big_type =false
 
static constexpr bool is_float_type =::std::is_floating_point_v<T>
 
static constexpr bool is_exponent_float_type =is_float_type
 
static constexpr bool is_fraction_float_type =false
 
static constexpr bool is_integer_type =::std::is_integral_v<T>
 
static constexpr bool is_signed =::std::is_signed_v<T>
 
static constexpr bool has_quiet_NaN =has_quiet_NaN_helper()
 
static constexpr bool has_signaling_NaN =has_signaling_NaN_helper()
 
static constexpr bool has_NaN =has_quiet_NaN || has_signaling_NaN
 
static constexpr bool has_inf =has_inf_helper()
 
static constexpr bool has_min =is_arithmetic_type
 
static constexpr bool has_max =is_arithmetic_type
 
static constexpr bool has_ε =is_arithmetic_type
 

详细描述

template<typename T>
struct elc::defs::base::math::arithmetic_type_info_prover< T >

算术类型帮助类型 任何后续定义的新算术类型都可以重载这些类型来实现数学库的泛型支持

在文件 all_defs.cpp8365 行定义.

成员类型定义说明

◆ float_type

◆ integer_type

◆ signed_type

◆ unsigned_type

在文件 all_defs.cpp8452 行定义.

成员函数说明

◆ ε()

template<typename T >
static constexpr auto elc::defs::base::math::arithmetic_type_info_prover< T >::ε ( )
inlinestaticconstexprnoexcept

在文件 all_defs.cpp8447 行定义.

8447 {
8448 return ::std::numeric_limits<T>::epsilon();
8449 }

◆ constexpr() [1/6]

◆ constexpr() [2/6]

◆ constexpr() [3/6]

◆ constexpr() [4/6]

◆ constexpr() [5/6]

◆ constexpr() [6/6]

◆ Inf()

template<typename T >
static constexpr auto elc::defs::base::math::arithmetic_type_info_prover< T >::Inf ( )
inlinestaticconstexprnoexcept

在文件 all_defs.cpp8422 行定义.

8422 {
8423 return ::std::numeric_limits<T>::infinity();
8424 }

◆ max()

template<typename T >
static constexpr auto elc::defs::base::math::arithmetic_type_info_prover< T >::max ( )
inlinestaticconstexprnoexcept

在文件 all_defs.cpp8440 行定义.

8440 {
8441 return ::std::numeric_limits<T>::max();
8442 }

◆ min()

template<typename T >
static constexpr auto elc::defs::base::math::arithmetic_type_info_prover< T >::min ( )
inlinestaticconstexprnoexcept

在文件 all_defs.cpp8434 行定义.

8434 {
8435 if constexpr(is_float_type)
8436 return ::std::numeric_limits<T>::lowest();
8437 else
8438 return ::std::numeric_limits<T>::min();
8439 }

◆ NaN()

template<typename T >
static constexpr auto elc::defs::base::math::arithmetic_type_info_prover< T >::NaN ( )
inlinestaticconstexprnoexcept

在文件 all_defs.cpp8406 行定义.

8406 {
8407 if constexpr(has_quiet_NaN)
8408 return quiet_NaN();
8409 else
8410 return signaling_NaN();
8411 }
static constexpr auto signaling_NaN() noexcept
static constexpr auto quiet_NaN() noexcept

◆ negative_Inf()

template<typename T >
static constexpr auto elc::defs::base::math::arithmetic_type_info_prover< T >::negative_Inf ( )
inlinestaticconstexprnoexcept

在文件 all_defs.cpp8425 行定义.

8425 {
8426 return -Inf();
8427 }

◆ quiet_NaN()

template<typename T >
static constexpr auto elc::defs::base::math::arithmetic_type_info_prover< T >::quiet_NaN ( )
inlinestaticconstexprnoexcept

在文件 all_defs.cpp8400 行定义.

8400 {
8401 return ::std::numeric_limits<T>::quiet_NaN();
8402 }

◆ signaling_NaN()

template<typename T >
static constexpr auto elc::defs::base::math::arithmetic_type_info_prover< T >::signaling_NaN ( )
inlinestaticconstexprnoexcept

在文件 all_defs.cpp8403 行定义.

8403 {
8404 return ::std::numeric_limits<T>::signaling_NaN();
8405 }

类成员变量说明

◆ has_ε

在文件 all_defs.cpp8445 行定义.

◆ has_inf

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::has_inf =has_inf_helper()
staticconstexpr

在文件 all_defs.cpp8421 行定义.

◆ has_max

在文件 all_defs.cpp8432 行定义.

◆ has_min

在文件 all_defs.cpp8430 行定义.

◆ has_NaN

在文件 all_defs.cpp8398 行定义.

◆ has_quiet_NaN

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::has_quiet_NaN =has_quiet_NaN_helper()
staticconstexpr

在文件 all_defs.cpp8396 行定义.

◆ has_signaling_NaN

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::has_signaling_NaN =has_signaling_NaN_helper()
staticconstexpr

在文件 all_defs.cpp8397 行定义.

◆ is_arithmetic_type

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::is_arithmetic_type =::std::is_arithmetic_v<T> || is_elc_expansion_base_type<T>
staticconstexpr

在文件 all_defs.cpp8367 行定义.

◆ is_basic_type

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::is_basic_type =::std::is_arithmetic_v<T>
staticconstexpr

在文件 all_defs.cpp8369 行定义.

◆ is_big_type

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::is_big_type =false
staticconstexpr

在文件 all_defs.cpp8371 行定义.

◆ is_exponent_float_type

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::is_exponent_float_type =is_float_type
staticconstexpr

在文件 all_defs.cpp8375 行定义.

◆ is_float_type

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::is_float_type =::std::is_floating_point_v<T>
staticconstexpr

在文件 all_defs.cpp8373 行定义.

◆ is_fraction_float_type

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::is_fraction_float_type =false
staticconstexpr

在文件 all_defs.cpp8376 行定义.

◆ is_integer_type

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::is_integer_type =::std::is_integral_v<T>
staticconstexpr

在文件 all_defs.cpp8378 行定义.

◆ is_signed

template<typename T >
constexpr bool elc::defs::base::math::arithmetic_type_info_prover< T >::is_signed =::std::is_signed_v<T>
staticconstexpr

在文件 all_defs.cpp8380 行定义.


该结构体的文档由以下文件生成: