ARTS 2.5.4 (git: 4c0d3b4d)
nonstd Namespace Reference

Functions

template<class T >
constexpr T abs (T x) noexcept
 
constexpr int isdigit (int ch) noexcept
 
constexpr int isspace (int ch) noexcept
 Returns 1 if x is a standard space-character. More...
 
constexpr bool isnan (double d) noexcept
 
constexpr bool isnan (long double d) noexcept
 
constexpr bool isnan (float d) noexcept
 

Detailed Description

For std functions that are changed somehow

Function Documentation

◆ abs()

template<class T >
constexpr T nonstd::abs ( x)
constexprnoexcept

abs(x) returns |x| using -x if x < 0 or x otherwise

Reason to re-implement: std::abs(x) is not officially constexpr

Parameters
[in]xAny real value type
Returns
|x|

Definition at line 13 of file nonstd.h.

Referenced by Interpolation::min_cyclic().

◆ isdigit()

constexpr int nonstd::isdigit ( int  ch)
constexprnoexcept

Checks if the given character in 0123456789.

Reason to re-implement: std::isdigit(ch) is not officially constexpr

The int-interface is kept from the standard

Parameters
[in]chA character
Returns
int from a simple boolean.

Definition at line 24 of file nonstd.h.

Referenced by Quantum::Number::cast_qnrat(), Species::is_normal_isotopologue(), Species::is_predefined_model(), ArtsParser::parse_intvector_from_string(), ArtsParser::parse_numvector_from_string(), ArtsParser::read_integer(), and ArtsParser::read_numeric().

◆ isnan() [1/3]

◆ isnan() [2/3]

constexpr bool nonstd::isnan ( float  d)
constexprnoexcept

Definition at line 55 of file nonstd.h.

References d.

◆ isnan() [3/3]

constexpr bool nonstd::isnan ( long double  d)
constexprnoexcept

Definition at line 54 of file nonstd.h.

References d.

◆ isspace()

constexpr int nonstd::isspace ( int  ch)
constexprnoexcept

Returns 1 if x is a standard space-character.

Reason to re-implement: std::isspace(ch) is not officially constexpr

The int-interface is kept from the standard

Parameters
[in]xa character
Returns
1 if x is a space

Definition at line 39 of file nonstd.h.

Referenced by Quantum::Number::count_items(), enum_strarray(), Quantum::Number::items(), Quantum::Number::lstrip(), double_istream::operator>>(), XMLTag::read_from_stream(), Quantum::Number::rstrip(), and xml_read_header_from_stream().