libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
event.hpp
1/*
2 * This file is part of libtcspc
3 * Copyright 2019-2026 Board of Regents of the University of Wisconsin System
4 * SPDX-License-Identifier: MIT
5 */
6
7#pragma once
8
9#include "type_list.hpp"
10
11#include <concepts>
12#include <ostream>
13
14namespace tcspc::internal {
15
16template <typename Event>
17concept abstime_stamped = requires { Event::abstime; };
18
19template <typename E>
20concept ostreamable = requires(std::ostream &s, E const &e) {
21 { s << e } -> std::same_as<std::ostream &>;
22};
23
24template <typename EventList>
25inline constexpr bool is_ostreamable_list_v = false;
26
27template <typename... Es>
28inline constexpr bool is_ostreamable_list_v<type_list<Es...>> =
29 (ostreamable<Es> && ...);
30
31} // namespace tcspc::internal