C++ named requirements:CustomizationPointObject(since C++20)
Customization point objects are stateless function objects of a literalsemiregular
class type.
All customization point objects of the same class type are equal. The effects of invoking different instances of that type on the same arguments are equivalent, whether the expression denoting the instance is an lvalue or rvalue, const-qualified or not. However, a volatile-qualified instance is not required to be invocable. Thus, customization point objects can be copied freely and the copies can be used interchangeably.
Let Fn
be the type of a customization point object, and Args...
be a set of types, if std::declval<Args>()... meet the requirements for arguments to Fn
, Fn
models
- std::invocable<Fn, Args...>,
- std::invocable<const Fn, Args...>,
- std::invocable<Fn&, Args...>, and
- std::invocable<const Fn&, Args...>.
Otherwise, no function call operator of Fn
participates in overload resolution.