VIPRA Documentation
Loading...
Searching...
No Matches
sim_output.hpp
1#pragma once
2
3#include <type_traits>
4
5#include "vipra/types/util/result_or_void.hpp"
6#include "vipra/util/all_of_type.hpp"
7
8namespace VIPRA {
14template <typename output_t>
15// NOLINTNEXTLINE(readability-identifier-naming) lowercase is a regular naming convetion here
16struct sim_output {
17 using type = std::conditional_t<std::is_same_v<output_t, void> ||
18 std::is_same_v<output_t, VOID> ||
19 Util::all_of_type_v<VOID, output_t>,
20 void, decltype(std::declval<output_t>().write())>;
21};
22
23template <typename output_t>
24using sim_output_t = typename sim_output<output_t>::type;
25} // namespace VIPRA
Helper struct to get the type of the output of the write function of the output_t.
Definition sim_output.hpp:16