@@ -25,27 +25,31 @@ namespace framework
2525// / is a specialization of a given reference type Ref.
2626// / See Framework/Core/test_TypeTraits.cxx for an example
2727
28- template <typename T, template <typename ...> class Ref >
29- struct is_specialization : std::false_type {};
28+ template <typename T, template <typename ...> class Ref >
29+ struct is_specialization : std::false_type {
30+ };
3031
31- template <template <typename ...> class Ref , typename ... Args>
32- struct is_specialization <Ref<Args...>, Ref>: std::true_type {};
32+ template <template <typename ...> class Ref , typename ... Args>
33+ struct is_specialization <Ref<Args...>, Ref> : std::true_type {
34+ };
3335
3436// helper struct to mark a type as non-messageable by defining a type alias
3537// with name 'non-messageable'
36- struct MarkAsNonMessageable {};
38+ struct MarkAsNonMessageable {
39+ };
3740
3841// detect if a type is forced to be non-messageable, this is done by defining
3942// a type alias with name 'non-messageable' of the type MarkAsNonMessageable
40- template < typename T, typename _ = void >
41- struct is_forced_non_messageable : public std ::false_type {};
43+ template <typename T, typename _ = void >
44+ struct is_forced_non_messageable : public std ::false_type {
45+ };
4246
4347// specialization to detect the type a lias
4448template <typename T>
4549struct is_forced_non_messageable <
4650 T,
47- typename std::enable_if<std::is_same<typename T::non_messageable, MarkAsNonMessageable>::value>::type
48- > : public std::true_type { };
51+ typename std::enable_if<std::is_same<typename T::non_messageable, MarkAsNonMessageable>::value>::type> : public std::true_type {
52+ };
4953
5054// TODO: extend this to exclude structs with pointer data members
5155// see e.g. https://stackoverflow.com/questions/32880990/how-to-check-if-class-has-pointers-in-c14
@@ -61,12 +65,14 @@ struct is_messageable : std::conditional<std::is_trivially_copyable<T>::value &&
6165// Detect a container by checking on the container properties
6266// this is the default trait implementation inheriting from false_type
6367template <typename T, typename _ = void >
64- struct is_container : std::false_type {};
68+ struct is_container : std::false_type {
69+ };
6570
6671// helper to be substituted if the specified template arguments are
6772// available
6873template <typename ... Ts>
69- struct class_member_checker {};
74+ struct class_member_checker {
75+ };
7076
7177// the specialization for container types inheriting from true_type
7278// the helper can be substituted if all the specified members are available
@@ -86,12 +92,9 @@ struct is_container<
8692 decltype(std::declval<T>().begin()),
8793 decltype(std::declval<T>().end()),
8894 decltype(std::declval<T>().cbegin()),
89- decltype(std::declval<T>().cend())
90- >,
91- void
92- >
93- > : public std::true_type {};
94-
95+ decltype(std::declval<T>().cend())>,
96+ void>> : public std::true_type {
97+ };
9598
9699// Detect whether a class has a ROOT dictionary
97100// This member detector idiom is implemented using SFINAE idiom to look for
@@ -100,19 +103,18 @@ struct is_container<
100103// serialization however is also possible for types only having the link
101104// in the LinkDef file. Such types can only be detected at runtime.
102105template <typename T, typename _ = void >
103- struct has_root_dictionary : std::false_type {};
106+ struct has_root_dictionary : std::false_type {
107+ };
104108
105109template <typename T>
106110struct has_root_dictionary <
107111 T,
108112 std::conditional_t <
109113 false ,
110114 class_member_checker<
111- decltype (std::declval<T>().Class())
112- >,
113- void
114- >
115- > : public std::true_type {};
115+ decltype (std::declval<T>().Class())>,
116+ void>> : public std::true_type {
117+ };
116118
117119// specialization for containers
118120// covers cases with T::value_type having ROOT dictionary, meaning that
0 commit comments