cxxomfort  rel.20210622
Simple backports for C++ - http://ryan.gulix.cl/fossil.cgi/cxxomfort/
Classes | Namespaces | Functions | Variables
cxxo-utils.hpp File Reference

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  OpaqueNative< Ty, Tag >
 Wraps and tags a native C type as an opaque type. More...
 

Namespaces

 cxxomfort
 Namespace of the cxxomfort library.
 

Functions

template<typename T >
CXXO_CONSTEXPRmin (constexpr_t, T a, T b) CXXO_NOEXCEPTNOTHROW
 constexpr variant of min()
 
template<typename T >
CXXO_CONSTEXPRmax (constexpr_t, T a, T b) CXXO_NOEXCEPTNOTHROW
 constexpr variant of max()
 
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

static constexpr rvoid None = {}
 Generic "keyword" for designating the None_t value.
 
const noop_t noop
 noop functor - when evaluated with arguments, it does nothing
 

Detailed Description

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.