nkr
A C++20 library with a custom meta-programming language.
Classes
nkr::constant_tg Class Reference

The identity type tag for nkr::constant_t. More...

Classes

class  identity_lb
 A label label that identifies its outer type as a member of an identity. More...
 
class  tag_lb
 A label label that identifies its outer type as a tag. More...
 
class  type_lb
 A label label that identifies its outer type as a type. More...
 

Detailed Description

The identity type tag for nkr::constant_t.

Note
nkr::constant_tg is an entity of the nkr::constant_t Identity.

Examples:

TEST_CASE_TEMPLATE("all qualifications should satisfy the following generic type traits",
type_tag_p,
volatile nkr::constant_tg,
const volatile nkr::constant_tg)
{
static_assert(nkr::generic::tag_tr<type_tag_p>);
static_assert(nkr::generic::tag::type_tr<type_tag_p>);
static_assert(nkr::generic::tag::identity_tr<type_tag_p>);
}
The identity type tag for nkr::constant_t.
Definition: constant_t_dec.h:48
TEST_CASE("should work within a nkr::TR expression in the place of any instantiation of its primary entity")
{
using subject_ts = nkr::ts<
nkr::AND_tg,
>;
static_assert(nkr::TR<
subject_ts,
>() == true);
static_assert(nkr::TR<
const subject_ts,
>() == true);
static_assert(nkr::TR<
volatile subject_ts,
>() == true);
static_assert(nkr::TR<
const volatile subject_ts,
>() == true);
}
Represents an immutable literal value in a compile-time or run-time context.
Definition: constant_t_dec.h:243
constexpr nkr::boolean::cpp_t TR() noexcept
Used to filter a type by its qualifications, and by other types, templates, identities,...
nkr::tr$::ts< operator_p, nkr::tuple::types_t< types_p... > > ts
A way to parenthesize and perform logical operations on several types in an nkr::TR expression.
Definition: tr_dec.h:181
nkr::tr$::ts< AND_tg, nkr::tuple::types_t< type_p > > t
A way to wrap a single type for use with an nkr::TR expression, to differentiate it from a template.
Definition: tr_dec.h:176