Metaprogramming¶
Template metaprogramming utilities and C++ type traits.
A¶
functionadvance(T *, ptrdiff_t)functionadvance(void *, ptrdiff_t)functionalign_down(T *, size_t)functionalign_down(T, std::type_identity_t<T>)functionalign_up(T *, size_t)functionalign_up(T, std::type_identity_t<T>)functionaligned_allocate(size_t) Allocates aligned memoryfunctionaligned_allocate(size_t, size_t) Allocates aligned memoryfunctionaligned_deallocate(T *) Deallocates aligned memorystructaligned_newfunctiondata_allocator<T>::allocate(size_type)functioncvals_t<T, values>::array() Pointer to a static array holding all valuesfunctioncvals_t<T>::array() Pointer to the (empty) array (always nullptr)classarray_ref<T> Reference to arrayconstructorarray_ref<T>::array_ref<T>()constructorarray_ref<T>::array_ref<T>(array_ref<T> &&)constructorarray_ref<T>::array_ref<T>(const array_ref<T> &)functionarray_ref<T>::array_ref<T>(Container &&)constructorarray_ref<T>::array_ref<T>(std::initializer_list<T>)constructorarray_ref<T>::array_ref<T>(T *, size_type)functionarray_to_string(const std::array<size_t, Dims> &, Getter &&, int, int, std::string_view, std::string_view, std::string_view) Render a multi-dimensional array as a nested, brace-delimited string.functionarray_to_string(size_t, Getter &&, int, int, std::string_view, std::string_view, std::string_view) Convenience overload ofarray_to_stringfor a one-dimensional array accessed through a getter callable.functionarray_to_string(size_t, T *, int, int, std::string_view, std::string_view, std::string_view) Convenience overload ofarray_to_stringfor a raw pointer buffer.functionas_string(const Args &...) Convert arbitrary values to astd::stringusing KFR's built-in formatting.functioncompound_type_traits<std::pair<T, T>>::at(const std::pair<subtype, subtype> &, size_t)functioncompound_type_traits<T>::at(const T &, size_t)classautocast_impl<Tfrom> Helper returned byautocastthat converts to any type viastatic_cast.functionautocast(const Tfrom &)classautofree<T> Smart pointer for aligned memory with automatic deallocation.constructorautofree<T>::autofree<T>() Default constructor.constructorautofree<T>::autofree<T>(autofree<T> &&)constructorautofree<T>::autofree<T>(const autofree<T> &)constructorautofree<T>::autofree<T>(size_t) Allocates aligned memory for given size.
B¶
enum constantdatatype::btypedefb8 Short names for common typesenum constantdatatype::b8functioncvals_t<T, values>::back() Returns the last valuefunctionarray_ref<T>::back()functioncvals_t<T, values>::begin() Iterator to the first valuefunctionarray_ref<T>::begin()functionrange<T>::begin()functionbind_func(Fn &&, Args &&...)functionbitcast_anything(const Tin &)variabletypebits<T>::bitsfunctionbuild_fmt_str(cchars_t<'@', chars...>, ctypes_t<Arg, Args...>) Build a compile-time format string: replace the leading'@'with the specifier forArgand recurse on the remaining arguments.functionbuild_fmt_str(cchars_t<ch, chars...>, ctypes_t<Args...>) Build a compile-time format string: copy a literal character and recurse.functionbuild_fmt_str(cchars_t<>, ctypes_t<>) Build a compile-time printf format string from a literal template and argument types.
C¶
variablespecial_value::c Active variant tagenum constantdatatype::cenum constantdatatype::c32enum constantdatatype::c64functioncstring<N>::c_str()functioncall_with_temp(size_t, Fn &&) Calls a function with a temporary buffer, allocated on the stack if small enough, otherwise on the heap.functionarray_ref<T>::cbegin()variablecbooltypedefcbool_t Compile-time boolean constantvariablecbools Constant instance of cbools_t<vals...>typedefcbools_t Compile-time list of boolean valuesvariablecchars Constant instance of cchars_t<vals...>typedefcchars_t Compile-time list of char valuesfunctioncconcat(T1, Ts...) Returns a value of the concatenated list typefunctionarray_ref<T>::cend()variablecfalse Constant instance of cfalse_ttypedefcfalse_t Compile-time false value typevariablecfalse_true Constant instance oftypedefcfilter_t Filters a cvals_t list, keeping only elements whose corresponding flag isfunctioncfilter(cvals_t<T, vals...>, cvals_t<bool, flags...>)functioncfind(cvals_t<T, values...>, std::type_identity_t<T>)classcfor_t<stop, start, conditional> Compile-time for loop helper that unrolls iteration over[start, stop).variablecfor_v Constant instance ofcfor_t<stop, start, conditional>used as the left-hand side ofKFR_FOR/KFR_FORC.functioncfor(cval_t<T, start>, cval_t<T, stop>, BodyFn &&)functioncforeach(A0 &&, A1 &&, A2 &&, A3 &&, Fn &&) Invokesfunctioncforeach(A0 &&, A1 &&, A2 &&, Fn &&) Invokesfunctioncforeach(A0 &&, A1 &&, Fn &&)functioncforeach(const std::tuple<Ts...> &, Fn &&)functioncforeach(ctypes_t<Ts...>, Fn &&)functioncforeach(cvals_t<T, values...>, Fn &&)functioncforeach(T &&, Fn &&)functionchoose_const() Selects the constant of the specific type from a list of candidates. Returns the candidate whose type matchesT; triggers a static_assert ifTis not present.functionchoose_const_fallback(C1) Single-argument fallback: convertsfunctionchoose_const_fallback(C1, Cs...)functionchoose_const(C1, Cs...) Recursively skips candidates whose type does not matchfunctioncif(cbool_t<false>, TrueFn &&, FalseFn &&) Compile-time conditional: invokesfunctioncif(cbool_t<true>, TrueFn &&, FalseFn &&)variablecint Constant instance of cint_t<val>typedefcint_t Compile-time int constantvariablecintrange Constant instance of the int rangevariablecints Constant instance of cints_t<vals...>typedefcints_t Compile-time list of int valuesvariablecintseq Constant instance of an int sequence withfunctioncmatch(T &&, Fn &&, Args...)functioncmaxof(cvals_t<T>) Returns the maximum value in the list (min offunctioncmaxof(cvals_t<T, val, vals...>) Returns the maximum value in the listfunctioncminof(cvals_t<T>) Returns the minimum value in the list (max offunctioncminof(cvals_t<T, val, vals...>) Returns the minimum value in the listclasscompound_type_traits<std::pair<T, T>> Specialization of compound_type_traits forstd::pair<T, T>classcompound_type_traits<T> Traits describing how a type composes scalar elements. Specialized for compound types (e.g.std::pair) to expose width, subtype and accessors.functionconcat_cstring()functionconcat_cstring(const cstring<N1> &)functionconcat_cstring(const cstring<N1> &, const cstring<N2> &, const Args &...)typedefconcat_lists Concatenates two or more cvals_t or ctypes_t lists into a single listtypedefarray_ref<T>::const_iteratortypedefarray_ref<T>::const_pointertypedefdata_allocator<T>::const_pointertypedefrange<T>::const_pointertypedefarray_ref<T>::const_referencetypedefdata_allocator<T>::const_referencetypedefrange<T>::const_referencetypedefarray_ref<T>::const_reverse_iteratortypedefcontainer_value_typefunctioncprod(cvals_t<T>) Returns the product of all values in the list (1 for an empty list)functioncprod(cvals_t<T, first, rest...>) Returns the product of all values in the listvariablecsize Constant instance of csize_t<val>typedefcsize_t Compile-time size_t constantvariablecsizerange Constant instance of the size_t rangevariablecsizes Constant instance of csizes_t<vals...>typedefcsizes_t Compile-time list of size_t valuesvariablecsizeseq Constant instance of csizeseq_t withtypedefcsizeseq_t Compile-time sequence of size_t valuesclasscstring<N>functioncsum(cvals_t<T>) Returns the sum of all values in the list (0 for an empty list)functioncsum(cvals_t<T, first, rest...>) Returns the sum of all values in the listfunctioncswitch(cvals_t<T>, std::type_identity_t<T>, Fn &&, DefFn &&, CmpFn &&) Switch over an empty list: always invokes the default handlerfunctioncswitch(cvals_t<T, v0, values...>, std::type_identity_t<T>, Fn &&, DefFn &&, CmpFn &&)functioncswitch(cvals_t<T, vs...>, const U &, Function &&, Fallback &&)variablectrue Constant instance of ctrue_ttypedefctrue_t Compile-time true value typevariablectype Constant instance of ctype_t<T>functionctype_name()classctype_t<T> Compile-time wrapper for a single type. Used to pass types as values in metaprogramming contexts.functionctypeid() Gets unique value associated with the typefunctionctypeid(T) Gets unique value associated with the typevariablectypes Constant instance of ctypes_t<Ts...>classctypes_t<Ts> Compile-time list of types.variablecuint Constant instance of cuint_t<val>typedefcuint_t Compile-time unsigned constantvariablecuintrange Constant instance of the unsigned rangevariablecuints Constant instance of cuints_t<vals...>typedefcuints_t Compile-time list of unsigned valuesvariablecuintseq Constant instance of an unsigned sequence withvariablecval Constant instance of cval_t<T, val>classcval_t<T, val> Compile-time constant wrapper carrying a value of typeT. Usable as a non-type template parameter and convertible to its underlying value.constructorcval_t<T, val>::cval_t<T, val>()constructorcval_t<T, val>::cval_t<T, val>(const cval_t<T, val> &)constructorcval_t<T, val>::cval_t<T, val>(cval_t<T, val> &&)variablecvalrange Constant instance of the value rangevariablecvals Constant instance of cvals_t<T, values...>classcvals_t<T> Empty specialization of cvals_t.classcvals_t<T, values> Compile-time list of constant values of typeT. Supports indexing, slicing, mapping and equality comparison at compile time.constructorcvals_t<T, values>::cvals_t<T, values...>()variablecvalseq Constant instance of cvalseq_t withtypedefcvalseq_t Compile-time arithmetic sequence ofsizevalues starting atstartwith stepstep.
D¶
variablespecial_value::d Stored floating-point literalfunctioncstring<N>::data()functionarray_ref<T>::data()functionautofree<T>::data() Returns pointer to underlying data.functionautofree<T>::data() Returns const pointer to underlying data.classdata_allocator<T> Aligned allocatorconstructordata_allocator<T>::data_allocator<T>()constructordata_allocator<T>::data_allocator<T>(const data_allocator<T> &)functiondata_allocator<T>::data_allocator<T>(const data_allocator<U> &)enumdatatype An enumeration representing data typefunctiondata_allocator<T>::deallocate(pointer, size_type)typedefcompound_type_traits<T>::deep_rebindtypedefcompound_type_traits<std::pair<T, T>>::deep_rebindtypedefcompound_type_traits<T>::deep_subtypetypedefdeep_subtype The deepest scalar subtype of a (possibly nested) compound typetypedefcompound_type_traits<std::pair<T, T>>::deep_subtypevariablecompound_type_traits<T>::deep_widthvariablecompound_type_traits<std::pair<T, T>>::deep_widthenum constantspecial_constant::default_constructed value-initializedvariabledefault_memory_alignmentvariablecompound_type_traits<T>::depthvariablecompound_type_traits<std::pair<T, T>>::depthfunctionderived_cast(const U *) Down-casts a const pointer fromfunctionderived_cast(U *)typedefrange<T>::diff_typetypedefarray_ref<T>::difference_typetypedefdata_allocator<T>::difference_typefunctionrange<T>::distance()functiondistance(const void *, const void *)functiondont_deduce(T)
E¶
variableelements Constant instance of elements_t<vals...>typedefelements_t Compile-time list of element indices (size_t values)functionarray_ref<T>::empty()classempty_struct<tag> Empty type tagged with a unique integertag.functioncvals_t<T, values>::end() Iterator past the last valuefunctionarray_ref<T>::end()functionrange<T>::end()enum constantspecial_constant::epsilon machine epsilonfunctioncvals_t<T, values>::equal(cvals_t<T, values...>) Returnsfunctioncvals_t<T, values>::equal(cvals_t<T, values2...>) Returnsfunctionerror(const Args &...) Print values to stderr, each formatted with its default conversion specifier.functionerrorln(const Args &...) Print values to stderr followed by a newline, then flush stderr.
F¶
enum constantdatatype::fenum constantdatatype::f16typedeff32enum constantdatatype::f32typedeff64enum constantdatatype::f64typedeff80enum constantdatatype::f80conceptf_classtypedeffbasetypedeffindinttypetypedeffix_typetypedeffloat_type Maps a bit width to the corresponding floating-point type (32 -> float, 64 -> double)enum constantspecial_constant::floating_point floating-point literal carried byfunctionfloor_div(long long, long long)typedefflt_typetypedeffmaxclassfmt_t<T, t, width, prec> Wrapper that carries a value together with printf-style format options.functionfmt(const T &) Wrapvaluewith a custom conversion specifier.functionfmtwidth(const T &) Wrapvaluewith only width/precision, keeping the default conversion specifier.structfn_get_firststructfn_get_secondstructfn_get_thirdstructfn_is_betweenstructfn_is_equalstructfn_is_greaterstructfn_is_greaterorequalstructfn_is_lessstructfn_is_lessorequalstructfn_is_notequalclassfn_noinline<Fn> Functor wrapper that invokesFnthroughnoinline.structfn_noopstructfn_pass_throughclassfn_return_constant<T, value> Functor returning a fixed constant of typeT, ignoring all arguments.classfn_returns<T>classformat_t<chars> Callable object holding a compile-time format literal (built byoperator""_format).functionformat(const std::string &, const Args &...) Format values into astd::stringusing a{}"-basedformat string.functionfprintfmt(FILE *, const std::string &, const Args &...) Print to a filefusing a{}"-basedformat string.functioncvals_t<T, values>::front() Returns the first valuefunctionarray_ref<T>::front()typedeffsubtypetypedefftypetypedeffunction_arguments Extracts the argument types of a functor'stypedeffunction_result Extracts the return type of a functor's
G¶
functionspecial_value::get() Returns the value converted to typefunctionget_first(T1 &&, Ts &&...) Function that returns its first argument and ignores all other argumentsfunctionget_second(T1, T2 &&, Ts &&...) Function that returns its second argument and ignores all other argumentsfunctionget_third(T1 &&, T2 &&, T3 &&, Ts &&...) Function that returns its third argument and ignores all other argumentsfunctionrepresentation<named_arg<T>>::get(const named_arg<T> &)functionrepresentation<std::array<T, Size>>::get(const std::array<T, Size> &)functionrepresentation<std::pair<T1, T2>>::get(const std::pair<T1, T2> &)functionrepresentation<std::shared_ptr<T1>>::get(const std::shared_ptr<T1> &)functionrepresentation<std::shared_ptr<void>>::get(const std::shared_ptr<void> &)functionrepresentation<std::string_view>::get(const std::string_view &)functionrepresentation<std::unique_ptr<T1>>::get(const std::unique_ptr<T1> &)functionrepresentation<std::vector<T, Allocator>>::get(const std::vector<T, Allocator> &)functionrepresentation<std::weak_ptr<T1>>::get(const std::weak_ptr<T1> &)functionrepresentation<T>::get(const T &)functioncvals_t<T, values>::get(csize_t<index>) Returns the value atfunctionctypes_t<Ts>::get(csize_t<index>) Returns a ctype_t wrapping the type at position
H¶
concepthas_begin_end Concept satisfied by types that supportconcepthas_data_size Concept satisfied by types that supportfunctionmap_indices_impl<size, Fn>::helper(csizes_t<I...>)
I¶
enum constantdatatype::itypedefi16enum constantdatatype::i16enum constantdatatype::i24typedefi32enum constantdatatype::i32typedefi64enum constantdatatype::i64typedefi8enum constantdatatype::i8concepti_classvariabletype_id_t::idfunctionilog2(T) Returns the base-2 logarithm oftypedefimaxfunctionimplicit_cast(U &&)variableindicesfor Constant instance of indicesfor_t for the given type listtypedefindicesfor_t Returns a sequence of indicesenum constantspecial_constant::infinity positive infinitytypedefmap_indices_impl<size, Fn>::input_typetypedefint_type Maps a bit width to the corresponding signed integer typeenum constantspecial_constant::integer integer literal carried byfunctionis_between(T, std::type_identity_t<T>, std::type_identity_t<T>)variableis_compound_type iffunctionis_constant_val(cval_t<T, value>) Returnsfunctionis_constant_val(T) Returnsfunctionis_divisible(T, T)functionis_equal(const T1 &, const T2 &) Returnsfunctionis_even(T) Returnsvariableis_f_classfunctionis_greater(const T1 &, const T2 &) Returnsfunctionis_greaterorequal(const T1 &, const T2 &) Returnsvariableis_i_classfunctionis_less(const T1 &, const T2 &) Returnsfunctionis_lessorequal(const T1 &, const T2 &) Returnsfunctionis_notequal(const T1 &, const T2 &) Returnsvariableis_number ifvariableis_number_or_bool ifvariableis_numbersvariableis_numeric Check if the type argument is a number or a compound type of numbersvariableis_numeric_args Check if the type arguments are numbers or compound types of numbersvariableis_numeric_or_bool Check if the type argument is a number, bool or a compound type of numbers or boolfunctionis_odd(T) Returnsfunctionis_poweroftwo(T) Returnsvariablecompound_type_traits<T>::is_scalarvariablecompound_type_traits<std::pair<T, T>>::is_scalarfunctionis_sequence(csizes_t<number, numbers...>)variableis_u_classtypedefis_val_ttypedefisubtypetypedefarray_ref<T>::iteratorstructrange<T>::iteratortypedefitype
J¶
functionjoin(T) Convert a single value to a string (terminator ofjoin).functionjoin(T, U, Ts...) Join values into a comma-separated string of the form{x},{y}, {rest...}".functionjust_value(T)
K¶
macroKFR_BIN_OPmacroKFR_CALL_CONV_SPECmacroKFR_CLASS_REFCOUNTmacroKFR_CVALmacroKFR_ENABLE_IFmacroKFR_ENABLE_IF_IMPLmacroKFR_ESCmacroKFR_FORmacroKFR_FORCmacroKFR_META_FNmacroKFR_META_FN_TPLmacroKFR_STANDARD_PACKmacroKFR_UN_OP
L¶
functioncstring<N>::length()variablespecial_value::ll Stored integer literalenum constantspecial_constant::lowest most negative representable value
M¶
functionmake_array_ref(Container &&)functionmake_array_ref(T *, std::size_t)functionmake_cstring(cchars_t<chars...>)functionmake_cstring(const char (&)[N])functionmake_nonmember(const Fn &)functionmake_range(T, T) Make iterable range objectfunctionmake_range(T, T, D) Make iterable range object with stepfunctionmap_indices() Returns a value ofmap_indices_t<size, Fn...>for use in non-type contexts.classmap_indices_impl<size, Fn> Compile-time index transformer used to build shuffle/permutation tables.typedefmap_indices_t Alias for thecsizes_tproduced bymap_indices_impl<size, Fn...>.functioncvals_t<T, values>::map(Fn &&) Returns a new list withenum constantspecial_constant::max maximum representable valuevariablerange<T>::maxvariablemax_size_t Maximum value representable by size_tenum constantspecial_constant::min minimum positive normalized valuevariablerange<T>::min
N¶
variablenamed_arg<T>::namevariablenamed::namestructnamedclassnamed_arg<T>constructornamed::named(const char *)enum constantspecial_constant::neg_infinity negative infinityenum constantspecial_constant::neg_max negated maximum representable valuefunctionnext_poweroftwo(T) Returns a nearest power of two that is greater or equal than nfunctionnoinline(Fn &&, Args &&...)functionnoop(Ts &&...) Function that returns void and ignores all its argumentsconceptnot_f_classconceptnot_i_classconceptnot_u_classfunctioncvals_t<T, values>::notequal(cvals_t<T, values...>) Returnstypedefctypes_t<Ts>::nth The type at positionconceptnumeric Concept satisfied by numeric types (numbers or compound types of numbers)
O¶
functioncval_t<T, val>::operator()() Returns the wrapped valuefunctionrange<T>::iterator::operator*()functionrange<T>::iterator::operator->()functionrange<T>::iterator::operator++()functionoperatorfunctionoperator User-defined literal returning aformat_tfor the given string literal.functionoperator User-defined literal returning aprint_tfor the given string literal.functionfn_pass_through::operator()(Args &&...)functionfn_noop::operator()(Args &&...)functionfn_get_first::operator()(Args &&...)functionfn_get_second::operator()(Args &&...)functionfn_get_third::operator()(Args &&...)functionfn_returns<T>::operator()(Args &&...)functionfn_return_constant<T, value>::operator()(Args &&...) Returns the wrapped constantfunctionfn_is_equal::operator()(Args &&...)functionfn_is_notequal::operator()(Args &&...)functionfn_is_less::operator()(Args &&...)functionfn_is_greater::operator()(Args &&...)functionfn_is_lessorequal::operator()(Args &&...)functionfn_is_greaterorequal::operator()(Args &&...)functionfn_is_between::operator()(Args &&...)functionfn_noinline<Fn>::operator()(Args &&...) Invokes the wrapped callable non-inlinedfunctionarray_ref<T>::operator=(array_ref<T> &&)functionautofree<T>::operator=(autofree<T> &&)functionformat_t<chars>::operator()(const Args &...) Format the given arguments using the stored literal.functionprint_t<chars>::operator()(const Args &...) Print the given arguments to stdout using the stored literal.functionarray_ref<T>::operator=(const array_ref<T> &)functionautofree<T>::operator=(const autofree<T> &)functioncstring<N>::operator==(const cstring<N> &, const cstring<N> &)functioncstring<N>::operator!=(const cstring<N> &, const cstring<N> &)functioncstring<N>::operator==(const cstring<NN> &)functioncstring<N>::operator!=(const cstring<NN> &)functionoperator==(const data_allocator<T1> &, const data_allocator<T2> &)functionoperator!=(const data_allocator<T1> &, const data_allocator<T2> &)functionrange<T>::iterator::operator!=(const iterator &)functioncvals_t<T, values>::operator[](csize_t<index>) Returns the value atfunctionoperator-(cval_t<T1, val1>)functionoperator+(cval_t<T1, val1>)functionoperator~(cval_t<T1, val1>)functionoperator!(cval_t<T1, val1>)functionoperator&&(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator||(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator==(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator!=(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator<(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator>(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator<=(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator>=(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator+(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator-(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator*(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator/(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator%(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator<<(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator>>(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator&(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator|(cval_t<T1, val1>, cvals_t<T2, vals2...>)functionoperator^(cval_t<T1, val1>, cvals_t<T2, vals2...>)functioncvals_t<T, values>::operator[](cvals_t<size_t, indices...>) Returns a sub-list containing the values atfunctionoperator-(cvals_t<T1, vals1...>)functionoperator+(cvals_t<T1, vals1...>)functionoperator~(cvals_t<T1, vals1...>)functionoperator!(cvals_t<T1, vals1...>)functionoperator&&(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator||(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator==(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator!=(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator<(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator>(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator<=(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator>=(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator+(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator-(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator*(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator/(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator%(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator<<(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator>>(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator&(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator|(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator^(cvals_t<T1, vals1...>, cval_t<T2, val2>)functionoperator&&(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator||(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator==(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator!=(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator<(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator>(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator<=(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator>=(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator+(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator-(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator*(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator/(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator%(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator<<(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator>>(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator&(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator|(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator^(cvals_t<T1, vals1...>, cvals_t<T2, vals2...>)functionoperator|(datatype, datatype)functionoperator&(datatype, datatype)functionaligned_new::operatorfunctionaligned_new::operatorfunctioncfor_t<stop, start, conditional>::operator=(Fn &&) Invokesfnfor each index in[start, stop), passing i as template argument.functionrange<T>::iterator::operator++(int)functionaligned_new::operatorfunctionaligned_new::operatorfunctioncstring<N>::operator[](size_t)functionautofree<T>::operator[](size_t) Access element at index.functionautofree<T>::operator[](size_t) Const access to element at index.functionarray_ref<T>::operator[](std::size_t)functionnamed::operator=(T &&)functiontype_id_t::operator==(type_id_t)functiontype_id_t::operator!=(type_id_t)operatorcval_t<T, val>::operator Implicit conversion to the underlying valuefunctionspecial_value::operator Converts to typefunctionautocast_impl<Tfrom>::operator Converts the stored value totypedefor_type Iftypedefdata_allocator<T>::rebind<U>::othervariableoverload_auto Convenience instance of the highest-priority tag for use in overload resolutiontypedefoverload_generic Alias for the lowest-priority tag, used as a fallback overloadstructoverload_priority<0> Lowest priority tag, base of the overload_priority chainclassoverload_priority<n> Tag type forming a linear inheritance chain used to rank overload candidates.overload_priority<n>derives fromoverload_priority<n-1>, so largernis a better match.
P¶
functionpack_elements() Returns the identity value (0) for an empty packfunctionpack_elements(Arg, Args...)functionpadcenter(size_t, const std::string &, char) Centertextwithin a field ofsizecharacters usingcharacter.functionpadleft(size_t, const std::string &, char) Left-aligntextwithin a field ofsizecharacters by appendingcharacter.functionpadright(size_t, const std::string &, char) Right-aligntextwithin a field ofsizecharacters by prependingcharacter.functionpass_through(T &&) Function that returns its first argumenttypedefpconstvoid Pointer to const voidtypedefarray_ref<T>::pointertypedefdata_allocator<T>::pointertypedefrange<T>::pointerfunctionprev_poweroftwo(T) Returns a nearest power of two that is less or equal than nclassprint_t<chars> Callable object holding a compile-time format literal (built byoperator""_print).functionprint(const Args &...) Print values to stdout, each formatted with its default conversion specifier.functionprintfmt(const std::string &, const Args &...) Print to stdout using a{}"-basedformat string.functionprintln(const Args &...) Print values to stdout followed by a newline.variableautofree<T>::ptr Unique pointer with custom deleter for aligned memory.functionptr_cast(const U *) Reinterprets a const pointer of typefunctionptr_cast(U *)functionptr_cast(U *, ptrdiff_t)typedefpvoid Pointer to void
R¶
enum constantspecial_constant::random_bits value filled with random bitsfunctionspecial_value::random_bits()functionspecial_value::random_generator() Returns a reference to the shared mt19937 random generator (seeded with 1)classrange<T> Iterable rangeconstructorrange<T>::range<T>(value_type, value_type, diff_type)typedefcompound_type_traits<T>::rebindtypedefcompound_type_traits<std::pair<T, T>>::rebindclassdata_allocator<T>::rebind<U>functionref_cast(const U &) Reinterprets a const reference of typefunctionref_cast(U &)typedefarray_ref<T>::referencetypedefdata_allocator<T>::referencetypedefrange<T>::referencetypedefrepr_type Alias for the type used byrepresentation<T>when formatting values of typeT.classrepresentation<named_arg<T>> Representation ofnamed_argasname= value".classrepresentation<std::array<T, Size>> Representation ofstd::arrayas a brace-delimited list of its elements.classrepresentation<std::pair<T1, T2>> Representation ofstd::pairas(first;second)".classrepresentation<std::shared_ptr<T1>> Representation ofstd::shared_ptrasType(value)orType(nullptr)".structrepresentation<std::shared_ptr<void>> Representation ofstd::shared_ptr<void>asType(pointer)orType(nullptr)".structrepresentation<std::string_view> Representation ofstd::string_viewas astd::string.classrepresentation<std::unique_ptr<T1>> Representation ofstd::unique_ptrasType(value)orType(nullptr)".classrepresentation<std::vector<T, Allocator>> Representation ofstd::vectoras a brace-delimited list of its elements.classrepresentation<std::weak_ptr<T1>> Representation ofstd::weak_ptrasType(value)orType(nullptr)".classrepresentation<T> Primary template for converting a value of typeTto its string representation.functionreturn_constant(Args &&...) Function that returns constant of type T and ignores all its argumentsfunctionreturns(Ts &&...) Function that returns value-initialization of type T and ignores all its argumentstypedefarray_ref<T>::reverse_iterator
S¶
functionscale()functionscale(csizes_t<indices...>)functionselect(cvals_t<bool, flags...>, cvals_t<T, values1...>, cvals_t<T, values2...>) Element-wise selection between two value lists based on a flag list. For each position, returnsvalues1[i]ifflags[i]istrue, otherwisevalues2[i].functioncvals_t<T, values>::size() Number of values in the listfunctioncvals_t<T>::size() Number of values (always 0)functionctypes_t<Ts>::size() Number of types in the listfunctioncstring<N>::size()functionarray_ref<T>::size()typedefcstring<N>::size_typetypedefarray_ref<T>::size_typetypedefdata_allocator<T>::size_typefunctioncstring<N>::slice(csize_t<start>)functioncstring<N>::slice(csize_t<start>, csize_t<count>)functionsnprintfmt(char *, size_t, const std::string &, const Args &...) Write to a buffer using a{}"-basedformat string.enumspecial_constant Enumeration of special numeric values selectable throughspecial_value.structspecial_value Type-erased constant convertible to any numeric typeT. Holds either aspecial_constanttag, an integer literal, or a floating-point literal, and converts toTaccording to the active variant.constructorspecial_value::special_value(const special_value &)constructorspecial_value::special_value(double) Constructs from a double literalconstructorspecial_value::special_value(int) Constructs from an int literalconstructorspecial_value::special_value(long long) Constructs from a long long literalconstructorspecial_value::special_value(special_constant) Constructs from a special_constant tagvariablerange<T>::iterator::stepvariablerange<T>::stepfunctionstop_constexpr() Non-constexpr function used to halt constant evaluation infunctionstr_find(const cstring<N1> &, const cstring<Nneedle> &)functionstr_replace(const cstring<N1> &, const cstring<Nfrom> &, const cstring<Nto> &)typedefcvals_t<T, values>::subscriptclasscvals_t<T, values>::subscript_t<cvals_t<size_t, indices...>>classcvals_t<T, values>::subscript_t<U>typedefcompound_type_traits<T>::subtypetypedefsubtype The immediate subtype of a compound typetypedefcompound_type_traits<std::pair<T, T>>::subtypetypedeftypebits<T>::subtypestructswallow Utility class to use in list-initialization context Accepts any number of arguments and discards them; useful for pack expansion side effects.functionswallow::swallow(T &&...) Constructs from any arguments, discarding them
T¶
typedefcval_t<T, val>::typetypedefcvals_t<T, values>::typetypedefcvals_t<T, values>::subscript_t<cvals_t<size_t, indices...>>::typetypedefcvals_t<T>::typetypedefctype_t<T>::type The wrapped typetypedefmap_indices_impl<size, Fn>::typetypedefrepresentation<T>::typetypedefrepresentation<named_arg<T>>::typetypedefrepresentation<std::pair<T1, T2>>::typetypedefrepresentation<std::unique_ptr<T1>>::typetypedefrepresentation<std::weak_ptr<T1>>::typetypedefrepresentation<std::shared_ptr<T1>>::typetypedefrepresentation<std::shared_ptr<void>>::typetypedefrepresentation<std::array<T, Size>>::typetypedefrepresentation<std::vector<T, Allocator>>::typetypedefrepresentation<std::string_view>::typestructtype_id_tconstructortype_id_t::type_id_t(const void *)functiontype_name() Gets the fully qualified name of the type, including namespace and template parameters (if any)functiontype_name(T) Gets the fully qualified name of the type, including namespace and template parameters (if any)typedeftype_of Extracts the wrapped type from a ctype_t-like wrapperenum constantdatatype::typebits_maskclasstypebits<T>variabletypeclassenum constantdatatype::typeclass_maskfunctiontypeindex() Returns the zero-based index of type
U¶
enum constantdatatype::utypedefu16enum constantdatatype::u16enum constantdatatype::u24typedefu32enum constantdatatype::u32typedefu64enum constantdatatype::u64typedefu8enum constantdatatype::u8conceptu_classtypedefuitypetypedefumaxtypedefunsigned_type Maps a bit width to the corresponding unsigned integer typetypedefusubtypetypedefutype
V¶
functionval_of(cval_t<T, value>) Extracts the value from a cval_t constantfunctionval_of(T) Returns the value itself (overload for runtime values)variablecval_t<T, val>::value The wrapped constant valuevariableautocast_impl<Tfrom>::valuevariablecstring<N>::valuevariablenamed_arg<T>::valuevariablefmt_t<T, t, width, prec>::valuevariablerange<T>::iterator::valuetypedefvalue_or_reftypedefcval_t<T, val>::value_typetypedefcstring<N>::value_typetypedefarray_ref<T>::value_typetypedefdata_allocator<T>::value_typetypedefrange<T>::value_typetypedefvalue_type_of Extracts the
W¶
variablecompound_type_traits<T>::widthvariablecompound_type_traits<std::pair<T, T>>::widthvariabletypebits<T>::widthfunctionwidthof() Returns the width (number of scalar components) offunctionwidthof(T) Returns the width (number of scalar components) offunctionwrap_fmt(const U &, ctype_t<Fmt>) Wrapvalwith the format typeFmtwhenFmtis notvoid.functionwrap_fmt(const U &, ctype_t<void>) Identity pass-through used when no format type is specified.
This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.