|
libtcspc C++ API
Streaming TCSPC and time tag data processing
|
Event types representing a type-safe union of event types.
Variant events can be used to treat a number of event types as a single type, for example to allow buffering of a stream of more than one type of event.
The type tcspc::variant_event is a thin wrapper around std::variant. In generic code working with an unknown set of event types, the type alias tcspc::variant_or_single_event is useful to avoid the overhead of std::variant when there is only one event type.
An equivalent to std::visit for use with tcspc::variant_or_single_event is provided: tcspc::visit_variant_or_single_event().
Topics | |
| Visiting a variant-or-single event | |
| Equivalent of std::visit for tcspc::variant_or_single_event. | |
Classes | |
| class | tcspc::variant_event< EventList > |
| Variant event. More... | |
Typedefs | |
| template<typename EventList> | |
| using | tcspc::variant_or_single_event |
| Select the plain event if single, otherwise tcspc::variant_event. | |
| using tcspc::variant_or_single_event |
Select the plain event if single, otherwise tcspc::variant_event.
When EventList contains a single event type, resolves to that event. Otherwise resolves to tcspc::variant_event<EventList>.