cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
<functional>

Backports related to Standard header <functional>

// or as part of:

Interfaces

Interfaces defined in this section:

The following interfaces are repointed to namespace std:: when found in namespace std::tr1:: :

The following interfaces are provided by cxxomfort when CXOMFORT_USE_INTERNAL_TR1 is defined:

Non-backport interfaces (cxxomfort::fix):

Callable Invocation with std::invoke

Cxxomfort implements a backport of std::invoke() from C++17 and std::invoke_r() from C++20 for C++11 onwards, and for certain compilers in C++03 mode. The feature is implemented and functions differently depending on the compiler and Standard mode.

Additionally, cxxomfort sets the SD6 macros __cpp_lib_invoke and __cpp_lib_invoke_r when it backports (not emulates) these facilities.

Notes

Note
Cxxomfort expects an implementation of std::reference_wrapper and related utilities to exist and function in order, as part of the general TR1 requirement.
Cxxomfort expects an implementation of std::bind and related utilities to exist and function in order, as part of the general TR1 requirement.

"Planned for the future"

See Also

See also
header/functional @ cppreference
utility/functional/reference_wrapper @ cppreference
utility/functional/not_fn @ cppreference
cxxomfort <functional> supplements
Member cxxomfort::cxxostd::cref (T const &t) CXXO_NOEXCEPTNOTHROW
"std::reference_wrapper"
Member cxxomfort::cxxostd::invoke (F &&callable, Args &&... args)
Invokes callables via callable( args... ), accounting for eg.: member-pointer callables.
Member cxxomfort::cxxostd::invoke_r (F &&callable, Args &&... args)
Invoke callables via (R)callable( args... ), specifying the return type.
Member cxxomfort::cxxostd::ref (T &t) CXXO_NOEXCEPTNOTHROW
"std::reference_wrapper"
File functional.hpp

Class reference_wrapper< T >

"std::reference_wrapper"

A reference_wrapper hosts a reference to an object in the same way a normal reference does, but separates assignment mechanics so that assigning to the wrapper changes whichobject is hosted, instead of changing the object itself. It basically behaves as a pointer-to-T.