Skip to content

Class cvals_t

class cvals_t<T, values> meta

template <typename T, T... values>
struct cvals_t

Compile-time list of constant values of type T . Supports indexing, slicing, mapping and equality comparison at compile time.

Template parameters
T element value type
values the packed constant values

constructor cvals_t<T, values...>()

constexpr KFR_MEM_INTRINSIC cvals_t() noexcept = default

Fully qualified name: kfr::cvals_t<T, values>::cvals_t<T, values...>()

Declared at meta.hpp:261

typedef type

using type = cvals_t<T, values...>

Fully qualified name: kfr::cvals_t<T, values>::type

Declared at meta.hpp:263

function size()

constexpr KFR_MEM_INTRINSIC static size_t size() noexcept { … }

Number of values in the list

Fully qualified name: kfr::cvals_t<T, values>::size()

Declared at meta.hpp:265

function operator[](csize_t<index>)

template <size_t index>
constexpr KFR_MEM_INTRINSIC T operator[](csize_t<index>) const noexcept { … }

Returns the value at

index

Fully qualified name: kfr::cvals_t<T, values>::operator[](csize_t<index>)

Declared at meta.hpp:268

function get(csize_t<index>)

template <size_t index>
constexpr KFR_MEM_INTRINSIC static T get(csize_t<index> = csize_t<index>()) noexcept { … }

Returns the value at

index

Fully qualified name: kfr::cvals_t<T, values>::get(csize_t<index>)

Declared at meta.hpp:274

function front()

constexpr KFR_MEM_INTRINSIC static T front() noexcept { … }

Returns the first value

Fully qualified name: kfr::cvals_t<T, values>::front()

Declared at meta.hpp:279

function back()

constexpr KFR_MEM_INTRINSIC static T back() noexcept { … }

Returns the last value

Fully qualified name: kfr::cvals_t<T, values>::back()

Declared at meta.hpp:281

function begin()

static KFR_MEM_INTRINSIC const T* begin() noexcept

Iterator to the first value

Fully qualified name: kfr::cvals_t<T, values>::begin()

Declared at meta.hpp:284

function end()

static KFR_MEM_INTRINSIC const T* end() noexcept

Iterator past the last value

Fully qualified name: kfr::cvals_t<T, values>::end()

Declared at meta.hpp:286

function array()

static KFR_MEM_INTRINSIC const T* array() noexcept

Pointer to a static array holding all values

Fully qualified name: kfr::cvals_t<T, values>::array()

Declared at meta.hpp:289

function operator[](cvals_t<size_t, indices...>)

template <size_t... indices>
constexpr KFR_MEM_INTRINSIC cvals_t<T, details::get_nth_e<indices, type>::value...> operator[](
    cvals_t<size_t, indices...>) const noexcept { … }

Returns a sub-list containing the values at

indices

Fully qualified name: kfr::cvals_t<T, values>::operator[](cvals_t<size_t, indices...>)

Declared at meta.hpp:296

class subscript_t<U>

template <typename U>
struct subscript_t { … }

Fully qualified name: kfr::cvals_t<T, values>::subscript_t<U>

Declared at meta.hpp:303

class subscript_t<cvals_t<size_t, indices...>>

template <size_t... indices>
struct subscript_t<cvals_t<size_t, indices...>> { … }

typedef type

using type = cvals_t<T, details::get_nth_e<indices, cvals_t<T, values...>>::value...>

Fully qualified name: kfr::cvals_t<T, values>::subscript_t<cvals_t<size_t, indices...>>::type

Declared at meta.hpp:309

Fully qualified name: kfr::cvals_t<T, values>::subscript_t<cvals_t<size_t, indices...>>

Declared at meta.hpp:307

typedef subscript

using subscript = typename subscript_t<U>::type

Fully qualified name: kfr::cvals_t<T, values>::subscript

Declared at meta.hpp:313

function map(Fn &&)

template <typename Fn>
constexpr KFR_MEM_INTRINSIC auto map(Fn&&) const noexcept -> cvals_t<T, static_cast<T>(Fn()(values))...> { … }

Returns a new list with

Fn applied to each value

Fully qualified name: kfr::cvals_t<T, values>::map(Fn &&)

Declared at meta.hpp:318

function equal(cvals_t<T, values...>)

constexpr KFR_MEM_INTRINSIC bool equal(cvals_t<T, values...>) const noexcept { … }

Returns

true if the other list holds the same values

Fully qualified name: kfr::cvals_t<T, values>::equal(cvals_t<T, values...>)

Declared at meta.hpp:324

function equal(cvals_t<T, values2...>)

template <T... values2>
constexpr KFR_MEM_INTRINSIC bool equal(cvals_t<T, values2...>) const noexcept { … }

Returns

false if the other list holds different values

Fully qualified name: kfr::cvals_t<T, values>::equal(cvals_t<T, values2...>)

Declared at meta.hpp:327

function notequal(cvals_t<T, values...>)

template <T... values2>
constexpr KFR_MEM_INTRINSIC bool notequal(cvals_t<T, values...> ind) const noexcept { … }

Returns

true if the other list holds different values

Fully qualified name: kfr::cvals_t<T, values>::notequal(cvals_t<T, values...>)

Declared at meta.hpp:334

Fully qualified name: kfr::cvals_t<T, values>

Declared at meta/tuple.hpp:15

Class cvals_t

class cvals_t<T> meta

template <typename T>
struct cvals_t<T> { … }

Empty specialization of cvals_t.

typedef type

using type = cvals_t<T>

Fully qualified name: kfr::cvals_t<T>::type

Declared at meta.hpp:344

function size()

constexpr KFR_MEM_INTRINSIC static size_t size() noexcept { … }

Number of values (always 0)

Fully qualified name: kfr::cvals_t<T>::size()

Declared at meta.hpp:346

function array()

static KFR_MEM_INTRINSIC const T* array() noexcept

Pointer to the (empty) array (always nullptr)

Fully qualified name: kfr::cvals_t<T>::array()

Declared at meta.hpp:349

Fully qualified name: kfr::cvals_t<T>

Declared at meta.hpp:342

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