|
nkr
A C++20 library with a custom meta-programming language.
|
Represents an immutable literal value in a compile-time or run-time context. More...
aliases | |
| using | value_t = type_p |
| The primary inner type of nkr::constant_t. More... | |
static functions | |
| static constexpr value_t | Value () noexcept |
| Returns the primary inner value of an instantiated nkr::constant_t. More... | |
constructors | |
| constexpr | constant_t () noexcept |
| constexpr | constant_t (const constant_t &other) noexcept |
| constexpr | constant_t (const volatile constant_t &other) noexcept |
| constexpr | constant_t (constant_t &&other) noexcept |
| constexpr | constant_t (volatile constant_t &&other) noexcept |
assigners | |
| constexpr constant_t & | operator= (const constant_t &other) noexcept=delete |
| constexpr volatile constant_t & | operator= (const constant_t &other) volatile noexcept=delete |
| constexpr constant_t & | operator= (const volatile constant_t &other) noexcept=delete |
| constexpr volatile constant_t & | operator= (const volatile constant_t &other) volatile noexcept=delete |
| constexpr constant_t & | operator= (constant_t &&other) noexcept=delete |
| constexpr volatile constant_t & | operator= (constant_t &&other) volatile noexcept=delete |
| constexpr constant_t & | operator= (volatile constant_t &&other) noexcept=delete |
| constexpr volatile constant_t & | operator= (volatile constant_t &&other) volatile noexcept=delete |
casters | |
| constexpr | operator nkr::constant_t< type_p, value_p >::value_t () const noexcept |
| Casts to the primary inner value of an instanced nkr::constant_t. More... | |
| constexpr | operator nkr::constant_t< type_p, value_p >::value_t () const volatile noexcept |
| Casts to the primary inner value of an instanced nkr::constant_t. More... | |
operators | |
| constexpr value_t | operator() () const noexcept |
| Returns the primary inner value of an instanced nkr::constant_t. More... | |
| constexpr value_t | operator() () const volatile noexcept |
| Returns the primary inner value of an instanced nkr::constant_t. More... | |
Represents an immutable literal value in a compile-time or run-time context.
nkr::constant_t is primarily used as a template type parameter in place of a template value parameter, for the sake of the one kind of template parameter design. However, there's nothing restricting its use in other contexts where desirable.
| using nkr::constant_t< type_p, value_p >::value_t = type_p |
The primary inner type of nkr::constant_t.
|
inlinestaticconstexprnoexcept |
Returns the primary inner value of an instantiated nkr::constant_t.
This is a static function and not a method because the most frequent use case for nkr::constant_t is to be passed as a template argument, therefore it should be easily accessible through an instantiated type more so than as a type instance.
Because C++ does not allow for both a static function and a method to have the same label, we can only define one or the other. However, according to the primary inner value design the primary inner value is also accessible through the nkr::constant_t::operator ()() const and nkr::constant_t::operator nkr::constant_t::value_t() const methods as well as their volatile complements.
|
inlineconstexprnoexcept |
Casts to the primary inner value of an instanced nkr::constant_t.
This caster returns the same primary inner value as nkr::constant_t::Value.
|
inlineconstexprnoexcept |
Casts to the primary inner value of an instanced nkr::constant_t.
This is the const volatile complement of nkr::constant_t::operator nkr::constant_t::value_t() const.
|
inlineconstexprnoexcept |
Returns the primary inner value of an instanced nkr::constant_t.
This operator returns the same primary inner value as nkr::constant_t::Value.
|
inlineconstexprnoexcept |
Returns the primary inner value of an instanced nkr::constant_t.
This is the const volatile complement of nkr::constant_t::operator ()() const.