3#ifndef TETL_FUNCTIONAL_REFERENCE_WRAPPER_HPP
4#define TETL_FUNCTIONAL_REFERENCE_WRAPPER_HPP
19constexpr auto FUN(T& t)
noexcept -> T&
25void FUN(T&&) =
delete;
73 [[nodiscard]]
constexpr operator type&()
const noexcept {
return *_ptr; }
76 [[nodiscard]]
constexpr auto get() const noexcept ->
type& {
return *_ptr; }
83 template <
typename... Args>
85 -> invoke_result_t<T&, Args...>
130 return cref(t.get());
Definition adjacent_find.hpp:8
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_wrappe...
Definition reference_wrapper.hpp:122
constexpr auto ref(T &t) noexcept -> reference_wrapper< T >
Function templates ref and cref are helper functions that generate an object of type reference_wrappe...
Definition reference_wrapper.hpp:103
reference_wrapper(T &) -> reference_wrapper< T >
constexpr auto addressof(T &arg) noexcept -> T *
Obtains the actual address of the object or function arg, even in presence of overloaded operator&.
Definition addressof.hpp:15
auto declval() noexcept -> add_rvalue_reference_t< T >
typename enable_if< B, T >::type enable_if_t
Definition enable_if.hpp:19
constexpr auto invoke(F &&f, Args &&... args) -> invoke_result_t< F, Args... >
Definition invoke.hpp:45
constexpr auto forward(remove_reference_t< T > ¶m) noexcept -> T &&
Forwards lvalues as either lvalues or as rvalues, depending on T. When t is a forwarding reference (a...
Definition forward.hpp:18
reference_wrapper is a class template that wraps a reference in a copyable, assignable object....
Definition reference_wrapper.hpp:40
constexpr auto operator=(reference_wrapper const &x) noexcept -> reference_wrapper &=default
Copy assignment operator. Drops the current reference and stores a reference to other....
constexpr reference_wrapper(reference_wrapper const &x) noexcept=default
Constructs a new reference wrapper. Copy constructor. Stores a reference to other....
constexpr reference_wrapper(U &&u) noexcept(noexcept(detail::FUN< T >(etl::forward< U >(u))))
Constructs a new reference wrapper. Converts x to T& as if by T& t = etl::forward(x);,...
Definition reference_wrapper.hpp:59
T type
Definition reference_wrapper.hpp:41
constexpr auto get() const noexcept -> type &
Returns the stored reference.
Definition reference_wrapper.hpp:76
constexpr auto operator()(Args &&... args) const noexcept(noexcept(invoke(get(), etl::forward< Args >(args)...))) -> invoke_result_t< T &, Args... >
Calls the Callable object, reference to which is stored. This function is available only if the store...
Definition reference_wrapper.hpp:84