tag_invoke

tag_invoke is a way of doing customization points in Modern C++ that is meant to be easier to work with and less hassle for end-users. It follows the paper P1895. A presentation for tag_invoke that covers its uses and its improvements over the status quo by Gašper Ažman can be found here.

Warning

doxygenvariable: Cannot find variable “ztd::tag_invoke” in doxygen xml output for project “ztd.idk” from directory: /home/docs/checkouts/readthedocs.org/user_builds/ztdidk/checkouts/latest/documentation/source/_build/cmake-build/documentation/doxygen/xml

template<typename _Tag, typename ..._Args>
class is_tag_invocable : public std::is_invocable<decltype(::ztd::__fn::tag_invoke), _Tag, _Args...>

Whether or not a given tag type and its arguments are tag invocable.

template<typename _Tag, typename ..._Args>
constexpr bool ztd::is_tag_invocable_v = is_tag_invocable<_Tag, _Args...>::value

A _v alias for ztd::is_tag_invocable.

template<typename _Tag, typename ..._Args>
class is_nothrow_tag_invocable : public __is_nothrow_tag_invocable_i<is_tag_invocable_v<_Tag, _Args...>, _Tag, _Args...>

Whether or not a given tag type and its arguments are both invocable and marked as a noexcept invocation.

template<typename _Tag, typename ..._Args>
constexpr bool ztd::is_nothrow_tag_invocable_v = is_nothrow_tag_invocable<_Tag, _Args...>::value

A _v alias for ztd::is_nothrow_tag_invocable.

using ztd::tag_invoke_result = ::std::invoke_result<decltype(tag_invoke), _Tag, _Args...>

A class representing the type that results from a tag invocation.

using ztd::tag_invoke_result_t = typename tag_invoke_result<_Tag, _Args...>::type

A _t alias that gives the actual type that results from a tag invocation.