5#ifndef INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_REFERENCE_WRAPPER_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_REFERENCE_WRAPPER_HPP_
43template <
typename TypeList>
48template <
typename Arg>
58template <
typename Arg1,
typename Arg2>
73template <
typename T,
typename = arene::base::constra
ints<>>
91template <
typename T,
typename = arene::base::constra
ints<>>
109template <
typename T,
typename = arene::base::constra
ints<>>
119 arene::base::constraints<typename T::first_argument_type, typename T::second_argument_type>> {
133template <
typename T,
typename = arene::base::constra
ints<>>
154 arene::base::type_list<std::remove_reference_t<
155 typename arene::base::member_function_pointer_traits<T>::implicit_argument_type>*>,
156 arene::base::member_function_arguments_t<T>>> {
208 auto get() const noexcept -> T& {
return *pointer_; }
215 operator T&()
const noexcept {
return get(); }
Arg1 first_argument_type
Type of the wrapped function's first argument.
Definition reference_wrapper.hpp:62
Arg2 second_argument_type
Type of the wrapped function's second argument.
Definition reference_wrapper.hpp:64
Arg argument_type
Type of the wrapped function's argument.
Definition reference_wrapper.hpp:52
Add argument member types to reference wrapped functions and member function pointers....
Definition reference_wrapper.hpp:44
typename T::second_argument_type second_argument_type
Forwarded type from the wrapped class.
Definition reference_wrapper.hpp:124
typename T::first_argument_type first_argument_type
Forwarded type from the wrapped class.
Definition reference_wrapper.hpp:122
Forward member types first_argument_type and second_argument_type from a reference wrapped class cont...
Definition reference_wrapper.hpp:111
typename T::result_type result_type
Forwarded type from the wrapped class.
Definition reference_wrapper.hpp:82
Forward member type result_type from a reference wrapped class containing that member type,...
Definition reference_wrapper.hpp:74
typename T::argument_type argument_type
Forwarded type from the wrapped class.
Definition reference_wrapper.hpp:100
Forward member type argument_type from a reference wrapped class containing that member type,...
Definition reference_wrapper.hpp:92
arene::base::function_return_t< std::remove_pointer_t< T > > result_type
Return type of the wrapped function.
Definition reference_wrapper.hpp:144
arene::base::member_function_return_t< T > result_type
Return type of the wrapped member function pointer.
Definition reference_wrapper.hpp:159
Add member types to reference_wrapper based on the underlying wrapped type.
Definition reference_wrapper.hpp:134
wraps a reference in a copyable and assignable object
Definition reference_wrapper.hpp:178
reference_wrapper(T &&)=delete
Cannot be constructed from an rvalue reference.
auto get() const noexcept -> T &
Access the stored reference.
Definition reference_wrapper.hpp:208
reference_wrapper(T &to_wrap) noexcept
Construct a reference_wrapper around a given input. Wrapped object must have an lvalue reference addr...
Definition reference_wrapper.hpp:198
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.
Definition reference_wrapper.hpp:225
T type
Wrapped type.
Definition reference_wrapper.hpp:187
Public export header for the constraints subpackage.
constexpr bool is_invocable_v
Determine if a functor type is invocable with the specified argument types.
typename function_traits< Fn >::return_type function_return_t
Determines the return and argument types of a function.
Definition function_traits.hpp:464
typename invoke_result< Fn, Args... >::type invoke_result_t
The return type of a functor invoked with the specified arguments.
Definition is_invocable.hpp:271
constexpr auto invoke(F &&func, Args &&... args) noexcept(is_nothrow_invocable_v< F, Args... >) ->
Implementation of std::invoke from C++23: invokes the specified callable with the specified arguments...
Definition invoke.hpp:281
constexpr bool is_nothrow_invocable_v
Determine if a functor type is no-throw invocable with the specified argument types.
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
function_return_t< typename member_pointer_traits< F >::pointee_type > member_function_return_t
Obtains the return type of a member function pointer type.
Definition function_traits.hpp:501
Definition accumulate.hpp:36
Definition reference_wrapper.hpp:33
auto ref(T &to_wrap) noexcept -> reference_wrapper< T >
Create a type-deduced reference_wrapper.
Definition reference_wrapper.hpp:239
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41
constexpr auto addressof(T &value) noexcept -> T *
Obtains the actual address of the object or function arg, even in presence of overloaded operator&.
Definition addressof.hpp:24
auto cref(T &to_wrap) noexcept -> reference_wrapper< T const >
Create a const type-deduced reference_wrapper.
Definition reference_wrapper.hpp:266
constexpr auto forward(remove_reference_t< T > &value) noexcept -> T &&
Cast a value to an rvalue if T is an rvalue or rvalue reference, otherwise forward an lvalue referenc...
Definition forward.hpp:24