![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
wraps a reference in a copyable and assignable object More...

Public Types | |
| using | type = T |
| Wrapped type. | |
Public Member Functions | |
| reference_wrapper (T &&)=delete | |
| Cannot be constructed from an rvalue reference. | |
| reference_wrapper (T &to_wrap) noexcept | |
Construct a reference_wrapper around a given input. Wrapped object must have an lvalue reference address and not be the same type of reference_wrapper. | |
| auto | get () const noexcept -> T & |
| Access the stored reference. | |
| operator T& () const noexcept | |
| Access the stored reference. | |
| template<class... Args, arene::base::constraints< enable_if_t< arene::base::is_invocable_v< T &, Args... > > > = nullptr> | |
| auto | operator() (Args &&... args) const noexcept(arene::base::is_nothrow_invocable_v< T &, Args... >) -> arene::base::invoke_result_t< T &, Args... > |
| Calls the stored function with given args. Only available if the stored type is callable. | |
wraps a reference in a copyable and assignable object
Forward declare reference wrapper for use in is_reference_wrapper.hpp This will avoid a circular dependency.
| T | Type of the reference |
| T | value type of the reference |
| using std::reference_wrapper< T >::type = T |
Wrapped type.
|
inlinenoexcept |
Construct a reference_wrapper around a given input. Wrapped object must have an lvalue reference address and not be the same type of reference_wrapper.
| U | Type of passed object or function to wrap |
| to_wrap | or function to wrap |
|
delete |
Cannot be constructed from an rvalue reference.
|
inlinenoexcept |
Access the stored reference.
|
inlinenoexcept |
Access the stored reference.
|
inlinenoexcept |
Calls the stored function with given args. Only available if the stored type is callable.
| args | Arguments to forward to the stored function |