|
stlab 2.4.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
|
Functions | |
| template<bool P, class T> | |
| constexpr auto | stlab::move_if (T &&t) noexcept -> detail::move_if_helper_t< P, T > |
| If P is true, casts t to an rvalue; otherwise keeps an lvalue reference. | |
| template<class F, class... Args> | |
| void | stlab::for_each_argument (F &&f, Args &&... args) |
| Invokes f(arg0), f(arg1), … f(argN). | |
| template<typename T> | |
| constexpr auto | stlab::copy (T &&value) noexcept(noexcept(std::decay_t< T >{static_cast< T && >(value)})) -> std::decay_t< T > |
| Returns a copy of the argument. Used to pass an lvalue to a function taking an rvalue, or to copy a type with an explicit copy constructor. | |
| template<class T> | |
| constexpr auto | stlab::move (T &&t) noexcept -> std::remove_reference_t< T > && |
| A standard move implementation but with a compile-time check for const types. | |
|
constexprnoexcept |
Returns a copy of the argument. Used to pass an lvalue to a function taking an rvalue, or to copy a type with an explicit copy constructor.
| void stlab::for_each_argument | ( | F && | f, |
| Args &&... | args ) |
Invokes f(arg0), f(arg1), … f(argN).
| f | Unary function invoked once per argument. |
| args | Arguments passed one-by-one to f. |