cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
C++17 Backports

Backports from C++17.

A listing of some of the features backported:

See also: C++14 Backports C++20 Backports .

Class bool_constant< B >
Implementation of bool_constant (bool specialization of integral_constant ).
Class byte
Standard declaration of a raw data, non-integral byte type.
Member cxxomfort::cxxostd::apply (F f, Tuple &t)
Invokes a callable f using the elements of the tuple t as arguments.
Member cxxomfort::cxxostd::as_ptr_const (T *const t) noexcept
"Type Utilities" as_const
Member cxxomfort::cxxostd::clamp (T const &val, T const &lo, T const &hi, Compare comp)
Clamps a value val within a range
Member cxxomfort::cxxostd::count (It ini, It fin, T const &tv)
Count the number of elements matching a given value
Member cxxomfort::cxxostd::count_if (It ini, It fin, Pred p)
Count the number of elements matching a predicate
Member cxxomfort::cxxostd::data (C &container) -> decltype(container.data())
Invoked c.data() or a similar construct for contiguous-storage sequences.
Member cxxomfort::cxxostd::data (C const &container)
"Iterators" empty
Member cxxomfort::cxxostd::for_each_n (II first, Size n, UnaryFunction f)
Invoke a function over the elements of a sequence.
Member cxxomfort::cxxostd::gcd (Num1 n1, Num2 n2) CXXO_NOEXCEPT
"Numeric" gcd
Member cxxomfort::cxxostd::invoke (F &&callable, Args &&... args)
Invokes callables via callable( args... ), accounting for eg.: member-pointer callables.
Member cxxomfort::cxxostd::lcm (Num1 n1, Num2 n2) CXXO_NOEXCEPT
"Numeric" lcm
Member cxxomfort::cxxostd::make_from_tuple (std::tuple< TupleArgs... > &&Tuple)
Constructs an object of type T using the tuple's elements for the constructor.
Member cxxomfort::cxxostd::not_fn (Fn &&f)
not_fn() from Fundamentals v2: a generic functor negator.
Member cxxomfort::cxxostd::size (C &c)
Invokes c.size() or an equivalent construct for a sequence.
Member cxxomfort::cxxostd::timespec_get (struct timespec *ts, int base)
Fetches timespec information from the system clock.
Member cxxomfort::cxxostd::to_integer (byte b)
Converts a byte to an integral value.
Class make_void< Arglist >
Constructs void from an instantiation.
Class timespec
timespec, from POSIX.
Class void_t
void type