Type utilities (move, copy, static_max, etc.).
|
|
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.
|