fire v0.19.0
Framework for sImulation and Reconstruction of Events
ClassVersion.h
Go to the documentation of this file.
1
6#ifndef FIRE_IO_CLASSVERSION_H
7#define FIRE_IO_CLASSVERSION_H
8
9namespace fire::io {
10
16namespace class_version_impl {
17
26template<class T, class R = void>
27struct enable_if_type { using type = R; };
28
39template<class T, class Enable = void>
40struct deducer {
42};
43
55template<class T>
56struct deducer<T, typename enable_if_type<typename T::version>::type> {
57 using version = typename T::version;
58};
59
60} // namespace class_version_impl
61
71template <typename T>
73
74}
75
83#define fire_class_version(VERS) using version = std::integral_constant<int,VERS>
84
85#endif // FIRE_IO_CLASSVERSION_H
86
Geant4 does a GLOBAL definition of the keyword TRUE.
Definition: AbstractData.h:11
constexpr int class_version
Helper const expression to pull out class version number.
Definition: ClassVersion.h:72
Underlying struct deducing the version of a class.
Definition: ClassVersion.h:40
Check if the passed type T is a valid type at compile time.
Definition: ClassVersion.h:27