Skip to content

Struct special_value

struct special_value meta

struct special_value { … }

Type-erased constant convertible to any numeric type T . Holds either a special_constant tag, an integer literal, or a floating-point literal, and converts to T according to the active variant.

constructor special_value(const special_value &)

constexpr special_value(const special_value&) = default

Fully qualified name: kfr::special_value::special_value(const special_value &)

Declared at meta.hpp:2142

constructor special_value(special_constant)

constexpr special_value(special_constant c) : c(c), ll(0), d(0) { … }

Constructs from a special_constant tag

Fully qualified name: kfr::special_value::special_value(special_constant)

Declared at meta.hpp:2144

constructor special_value(double)

constexpr special_value(double d) : c(special_constant::floating_point), ll(0), d(d) { … }

Constructs from a double literal

Fully qualified name: kfr::special_value::special_value(double)

Declared at meta.hpp:2146

constructor special_value(long long)

constexpr special_value(long long ll) : c(special_constant::integer), ll(ll), d(0) { … }

Constructs from a long long literal

Fully qualified name: kfr::special_value::special_value(long long)

Declared at meta.hpp:2148

constructor special_value(int)

constexpr special_value(int i) : c(special_constant::integer), ll(i), d(0) { … }

Constructs from an int literal

Fully qualified name: kfr::special_value::special_value(int)

Declared at meta.hpp:2150

function get()

template <typename T>
constexpr T get() const noexcept { … }

Returns the value converted to type

T according to the active variant

Fully qualified name: kfr::special_value::get()

Declared at meta.hpp:2154

function operator type-parameter-0-0()

template <typename T>
constexpr operator T() const noexcept { … }

Converts to type

T via get<T>()

Fully qualified name: kfr::special_value::operator type-parameter-0-0()

Declared at meta.hpp:2191

variable c

Active variant tag

Fully qualified name: kfr::special_value::c

Declared at meta.hpp:2195

variable ll

long long ll

Stored integer literal

Fully qualified name: kfr::special_value::ll

Declared at meta.hpp:2196

variable d

double d

Stored floating-point literal

Fully qualified name: kfr::special_value::d

Declared at meta.hpp:2197

function random_generator()

static std::mt19937& random_generator()

Returns a reference to the shared mt19937 random generator (seeded with 1)

Fully qualified name: kfr::special_value::random_generator()

Declared at meta.hpp:2200

function random_bits()

template <typename T>
static T random_bits()

Template parameters
T target type

Fully qualified name: kfr::special_value::random_bits()

Declared at meta.hpp:2209

Fully qualified name: kfr::special_value

Declared at meta.hpp:2140

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.