My Project
|
reference_wrapper prototype More...
#include <is_reference_wrapper.hpp>
Public Types | |
using | type = T |
alias for: T | |
Public Member Functions | |
constexpr | reference_wrapper (T &val) noexcept |
Used to initialize a reference_wrapper by getting an address to the provided "val" and storing the address for use later. More... | |
constexpr T & | get () const noexcept |
Returns a reference to the thing that is wrapped. This is done by taking the stored address and returning a reference instead of an address. More... | |
template<typename... ARGS> | |
constexpr invoke_result_t< T &, ARGS... > | operator() (ARGS &&... a) const |
Invokes the reference_wrapper as if it were a function. More... | |
reference_wrapper prototype
bsl::reference_wrapper is a class template that wraps a reference. Unlike the std::reference_wrapper, the implicit conversion operator is not supported as that would not be compliant with AUTOSAR. We also do not add the assignment operator as that would result in needing to define the rule of 5 which is not needed (there is no harm in allowing moves as they result in the same thing as a copy).
T | the type of reference to wrap |
|
inlineexplicitnoexcept |
Used to initialize a reference_wrapper by getting an address to the provided "val" and storing the address for use later.
val | the thing to get the address of and store. |
|
inlinenoexcept |
Returns a reference to the thing that is wrapped. This is done by taking the stored address and returning a reference instead of an address.
|
inline |
Invokes the reference_wrapper as if it were a function.
ARGS | the types of arguments to pass to the wrapped function. |
a | the arguments to pass to the wrapped function. |
throws | if the wrapped function throws |