28 #ifndef BSL_REFERENCE_WRAPPER_HPP 29 #define BSL_REFERENCE_WRAPPER_HPP 53 class reference_wrapper final
83 [[nodiscard]] constexpr T &
103 template<
typename... ARGS>
107 return invoke(this->
get(), bsl::forward<ARGS>(a)...);
constexpr auto invoke(FUNC &&f, TN &&... tn) noexcept(//-- noexcept(details::invoke_impl< FUNC, TN... >::call(//-- bsl::forward< FUNC >(f),//-- bsl::forward< TN >(tn)...))) -> decltype(details::invoke_impl< FUNC, TN... >::call(bsl::forward< FUNC >(f), bsl::forward< TN >(tn)...))
Invokes the callable object "f" with arguments "tn".
Definition: invoke.hpp:61
constexpr reference_wrapper(T &val) noexcept
Used to initialize a reference_wrapper by getting an address to the provided "val" and storing the ad...
Definition: reference_wrapper.hpp:71
constexpr T * addressof(T &val) noexcept
Obtains the actual address of the object or function arg, even in presence of overloaded operator& (i...
Definition: addressof.hpp:47
constexpr T & get() const noexcept
Returns a reference to the thing that is wrapped. This is done by taking the stored address and retur...
Definition: reference_wrapper.hpp:84
T type
alias for: T
Definition: reference_wrapper.hpp:60
typename invoke_result< FUNC, TN... >::type invoke_result_t
a helper that reduces the verbosity of bsl::invoke_result
Definition: invoke_result.hpp:54
constexpr invoke_result_t< T &, ARGS... > operator()(ARGS &&... a) const
Invokes the reference_wrapper as if it were a function.
Definition: reference_wrapper.hpp:105