tetl 0.1.0
Embedded Template Library
|
Go to the source code of this file.
Classes | |
struct | reference_wrapper< T > |
reference_wrapper is a class template that wraps a reference in a copyable, assignable object. It is frequently used as a mechanism to store references inside standard containers (like etl::static_vector) which cannot normally hold references. Specifically, reference_wrapper is a CopyConstructible and CopyAssignable wrapper around a reference to object or reference to function of type T. Instances of reference_wrapper are objects (they can be copied or stored in containers) but they are implicitly convertible to T&, so that they can be used as arguments with the functions that take the underlying type by reference. If the stored reference is Callable, reference_wrapper is callable with the same arguments. More... | |
Namespaces | |
namespace | etl |
Functions | |
template<typename T > | |
constexpr auto | cref (reference_wrapper< T > t) noexcept -> reference_wrapper< T const > |
template<typename T > | |
void | cref (T const &&)=delete |
template<typename T > | |
constexpr auto | cref (T const &t) noexcept -> reference_wrapper< T const > |
Function templates ref and cref are helper functions that generate an object of type reference_wrapper, using template argument deduction to determine the template argument of the result. module Utility. | |
template<typename T > | |
constexpr auto | ref (reference_wrapper< T > t) noexcept -> reference_wrapper< T > |
Function templates ref and cref are helper functions that generate an object of type reference_wrapper, using template argument deduction to determine the template argument of the result. | |
template<typename T > | |
constexpr auto | ref (T &t) noexcept -> reference_wrapper< T > |
Function templates ref and cref are helper functions that generate an object of type reference_wrapper, using template argument deduction to determine the template argument of the result. | |
template<typename T > | |
reference_wrapper (T &) -> reference_wrapper< T > | |