libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
tcspc::rvalue_handler_for Concept Reference

Description

Concept that is satisfied when a processor handles an event type by rvalue reference.

Determines whether the processor Proc handles the event type Event passed as rvalue reference.

This rvalue-specific check is mostly useful when debugging concept-based constraints on the handle() overloads of a processor.

Note that the concept is satisfied even if Proc only implements handle(Event const &), because rvalues can bind to a const lvalue reference. This check is still useful in case the processor has different overloads for rvalue and const lvalue references.

If the event handler exists but has a return type other than void, the concept is not satisfied.

Note
A satisfied concept indicates that Proc handles Event && provided that Proc and the relevant Proc::handle() overload can be instantiated (if Proc is a template class). It is possible that instantiation will fail (due to static_assert failures or other issues) even if the concept is satisfied.

Concept definition

template<typename Proc, typename Event>
concept rvalue_handler_for = requires(Proc &p, Event &&e) {
{ p.handle(std::move(e)) } -> std::same_as<void>;
}
Concept that is satisfied when a processor handles an event type by rvalue reference.
Definition processor.hpp:65