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

Description

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

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

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

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 const & 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 const_handler_for = requires(Proc &p, Event const &e) {
{ p.handle(e) } -> std::same_as<void>;
}
Concept that is satisfied when a processor handles an event type by const lvalue reference.
Definition processor.hpp:91