struct with_annotation_t
Declaration
struct with_annotation_t : public tag_fallback { /* full declaration omitted */ };Description
//////////////////////////////////////////////////////////////////////// Helper base class implementing the tag_invoke logic for DPOs that fall back to directly invoke its fallback. This base class is in many cases preferable to the plain tag base class. With the normal tag base class a default, unconstrained, default tag_invoke overload will take precedence over user-defined tag_invoke overloads that are not perfect matches. For example, with a default overload: template <typename T> auto tag_invoke(tag_t, T & & t) {...} and a user-defined overload in another namespace: auto tag_invoke(my_type t) the user-defined overload will only be considered when it is an exact match. This means const and reference qualifiers must match exactly, and conversions to a base class are not considered. With tag_fallback one can define the default implementation in terms of a tag_fallback_invoke overload instead of tag_invoke: template <typename T> auto tag_fallback_invoke(tag_t, T & & t) {...} With the same user-defined tag_invoke overload, the user-defined overload will now be used if it is a match even if it isn't an exact match. This is because tag_fallback will dispatch to tag_fallback_invoke only if there are no matching tag_invoke overloads.
Declared at: libs/pika/async_base/include/pika/async_base/scheduling_properties.hpp:46
Inherits from: tag_fallback