cxxomfort
rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
Small utilities used by various components of cxxomfort, but low-level and generic enough that they don't get categorized into the backport headers. More...
Classes | |
struct | noop_t |
noop function More... | |
class | outp< T > |
denotes a reference used as an output argument to a function. More... | |
struct | prio< I > |
priority tag struct, for ordering of function specializations. More... | |
struct | constexpr_t |
Tag type for constexpr . More... | |
struct | OpaqueNative< Ty, Tag > |
Wraps and tags a native C type as an opaque type. More... | |
Namespaces | |
cxxomfort | |
Namespace of the cxxomfort library. | |
Typedefs | |
typedef rvoid | None_t |
Functions | |
template<typename T > | |
CXXO_CONSTEXPR T | min (constexpr_t, T a, T b) CXXO_NOEXCEPTNOTHROW |
template<typename T > | |
CXXO_CONSTEXPR T | max (constexpr_t, T a, T b) CXXO_NOEXCEPTNOTHROW |
bool | bool_once (bool &flag) CXXO_NOEXCEPTNOTHROW |
Evaluates a bool variable and "unchecks" it, returnnig its old value. More... | |
template<typename T > | |
T const * | coalesce_ptrs (T *... ptrs) noexcept |
Examines a series of pointers and returns the value in the first non-NULL element among them. More... | |
template<typename Iter > | |
Iter | coalesce (Iter ini, Iter fin) CXXO_NOEXCEPTNOTHROW |
Coalesces a sequence, returning the first non-NULL element, or the last element. More... | |
Variables | |
const noop_t | noop |
noop functor - when evaluated with arguments, it does nothing | |
Small utilities used by various components of cxxomfort, but low-level and generic enough that they don't get categorized into the backport headers.
Including this header brings up the base cxxomfort utilities as well.
struct cxxomfort::constexpr_t |
Tag type for constexpr
.
This is used by some cxxomfort utilities to disambiguate provided function calls that only differ on whether they can work in constexpr
context.
struct cxxomfort::OpaqueNative |
Wraps and tags a native C type as an opaque type.
OpaqueNative
takes a native C type, like int
or float
and wraps it with a Tag type as an opaque (named) type. The result is a type that can be used by explicitly accessing the underlying type where desired.
The wrapper provides access to the underlying object via the value
member, but the opaque interface is used via the value()
and opaque()
functions.