Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
std::integral_constant< Type, Value > Class Template Reference

A helper class to represent a compile-time constant with the specified type and value. Instances of the type are implicitly convertible to the specified type and are nullary-invocable, yielding the specified type. The result of such a conversion or invocation is the specified value. The value member is a constant of the specified type, holding the specified value. More...

Public Types

using type = integral_constant
 The type of this class.
 
using value_type = Type
 The type of the value.
 

Public Member Functions

constexpr operator value_type () const noexcept
 Implicit conversion to Type.
 
constexpr auto operator() () const noexcept -> value_type
 Nullary function call operator.
 

Static Public Attributes

static constexpr value_type value {Value}
 The constant.
 

Detailed Description

template<typename Type, Type Value>
class std::integral_constant< Type, Value >

A helper class to represent a compile-time constant with the specified type and value. Instances of the type are implicitly convertible to the specified type and are nullary-invocable, yielding the specified type. The result of such a conversion or invocation is the specified value. The value member is a constant of the specified type, holding the specified value.

Template Parameters
TypeThe type of the value
ValueThe value of the constant

Member Typedef Documentation

◆ type

template<typename Type, Type Value>
using std::integral_constant< Type, Value >::type = integral_constant

The type of this class.

◆ value_type

template<typename Type, Type Value>
using std::integral_constant< Type, Value >::value_type = Type

The type of the value.

Member Function Documentation

◆ operator value_type()

template<typename Type, Type Value>
std::integral_constant< Type, Value >::operator value_type ( ) const
inlineconstexprnoexcept

Implicit conversion to Type.

Returns
The specified Value

◆ operator()()

template<typename Type, Type Value>
auto std::integral_constant< Type, Value >::operator() ( ) const -> value_type
inlineconstexprnoexcept

Nullary function call operator.

Returns
The specified Value

Member Data Documentation

◆ value

template<typename Type, Type Value>
value_type std::integral_constant< Type, Value >::value {Value}
staticconstexpr

The constant.


The documentation for this class was generated from the following file: