Functions¶
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 memoryfunctionarray_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.functionautocast(const Tfrom &)
B¶
functionbind_func(Fn &&, Args &&...)functionbitcast_anything(const Tin &)functionbuild_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¶
functioncall_with_temp(size_t, Fn &&) Calls a function with a temporary buffer, allocated on the stack if small enough, otherwise on the heap.functioncconcat(T1, Ts...) Returns a value of the concatenated list typefunctioncfilter(cvals_t<T, vals...>, cvals_t<bool, flags...>)functioncfind(cvals_t<T, values...>, std::type_identity_t<T>)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 &&)functioncmatch(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 listfunctionconcat_cstring()functionconcat_cstring(const cstring<N1> &)functionconcat_cstring(const cstring<N1> &, const cstring<N2> &, const Args &...)functioncprod(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 listfunctioncsum(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 &&)functionctype_name()functionctypeid() Gets unique value associated with the typefunctionctypeid(T) Gets unique value associated with the type
D¶
functionderived_cast(const U *) Down-casts a const pointer fromfunctionderived_cast(U *)functiondistance(const void *, const void *)functiondont_deduce(T)
E¶
functionerror(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¶
functionfloor_div(long long, long long)functionfmt(const T &) Wrapvaluewith a custom conversion specifier.functionfmtwidth(const T &) Wrapvaluewith only width/precision, keeping the default conversion specifier.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.
G¶
functionget_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 arguments
I¶
functionilog2(T) Returns the base-2 logarithm offunctionimplicit_cast(U &&)functionis_between(T, std::type_identity_t<T>, std::type_identity_t<T>)functionis_constant_val(cval_t<T, value>) Returnsfunctionis_constant_val(T) Returnsfunctionis_divisible(T, T)functionis_equal(const T1 &, const T2 &) Returnsfunctionis_even(T) Returnsfunctionis_greater(const T1 &, const T2 &) Returnsfunctionis_greaterorequal(const T1 &, const T2 &) Returnsfunctionis_less(const T1 &, const T2 &) Returnsfunctionis_lessorequal(const T1 &, const T2 &) Returnsfunctionis_notequal(const T1 &, const T2 &) Returnsfunctionis_odd(T) Returnsfunctionis_poweroftwo(T) Returnsfunctionis_sequence(csizes_t<number, numbers...>)
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)
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.
N¶
functionnext_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 arguments
O¶
functionoperatorfunctionoperator User-defined literal returning aformat_tfor the given string literal.functionoperator User-defined literal returning aprint_tfor the given string literal.functionoperator==(const data_allocator<T1> &, const data_allocator<T2> &)functionoperator!=(const data_allocator<T1> &, const data_allocator<T2> &)functionoperator-(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...>)functionoperator-(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)
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 argumentfunctionprev_poweroftwo(T) Returns a nearest power of two that is less or equal than nfunctionprint(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.functionptr_cast(const U *) Reinterprets a const pointer of typefunctionptr_cast(U *)functionptr_cast(U *, ptrdiff_t)
Q¶
functionq(T) Wrap the string representation ofxin double quotes.
R¶
functionref_cast(const U &) Reinterprets a const reference of typefunctionref_cast(U &)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 arguments
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].functionsnprintfmt(char *, size_t, const std::string &, const Args &...) Write to a buffer using a{}"-basedformat string.functionstop_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> &)
T¶
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)functiontypeindex() Returns the zero-based index of type
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)
W¶
functionwidthof() 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.