Description
[Added with TR1]
A reference_wrapper<Ty> is copy constructible and assignable, and holds a pointer that points to an object of type Ty.
A specialization reference_wrapper<Ty> is derived from std::unary_function<T1, Ret> (hence defining the nested type result_type as a synonym for Ret and the nested type argument_type as a synonym for T1) only if the type Ty is:
- a function type or pointer to function type taking one argument of type T1 and returning Ret; or
- a pointer to a member function Ret T::f() cv, where cv represents the member function's cv-qualifiers; the type T1 is cv T*; or
- a class type that is derived from unary_function<T1, Ret>.
A specialization reference_wrapper<Ty> is derived from std::binary_function<T1, T2, Ret> (hence defining the nested type result_type as a synonym for Ret, the nested type first_argument_type as a synonym for T1, and the nested type second_argument_type as a synonym for T2) only if the type Ty is:
- a function type or pointer to function type taking two arguments of types T1 and T2 and returning Ret; or
- a pointer to a member function Ret T::f(T2) cv, where cv represents the member function's cv-qualifiers; the type T1 is cv T*; or
- a class type that is derived from binary_function<T1, T2, Ret>.