8 #ifndef FAIRMQTEMPLATE_H
9 #define FAIRMQTEMPLATE_H
15 #include <type_traits>
18 #include <boost/archive/text_iarchive.hpp>
31 template<
typename Tuple,
size_t Pos>
34 out << std::get<std::tuple_size<Tuple>::value - Pos>(t) <<
',';
38 template<
typename Tuple>
41 return out << std::get<std::tuple_size<Tuple>::value - 1>(t);
44 template<
typename... Args>
45 std::ostream&
operator<<(std::ostream& out,
const std::tuple<Args...>& t)
58 template<
typename T,
typename Sig,
typename =
void>
62 template<
typename T,
typename R,
typename... Args>
66 typename std::enable_if<
67 std::is_convertible<decltype(std::declval<T>().SetFileProperties(std::declval<Args>()...)), R>::value
68 || std::is_same<R, void>::value
71 >::type> : std::true_type
75 template<
typename T,
typename Sig,
typename =
void>
79 template<
typename T,
typename R,
typename... Args>
83 typename std::enable_if<
84 std::is_convertible<decltype(std::declval<T>().InitTClonesArray(std::declval<Args>()...)), R>::value
85 || std::is_same<R, void>::value
88 >::type> : std::true_type
93 template<
typename T,
typename Sig>
96 template<
typename T,
typename Sig>
102 template<
typename T,
typename Archive = boost::archive::text_iarchive>
105 LOG(info) <<
"Info on type " << classname;
107 if (std::is_class<T>::value) {
109 if (std::is_pod<T>::value) {
110 LOG(info) << classname <<
" is POD";
112 LOG(info) << classname <<
" is not POD";
115 if (std::is_trivial<T>::value) {
116 LOG(info) << classname <<
" is trivial";
118 LOG(info) << classname <<
" is not trivial";
127 if (std::is_standard_layout<T>::value) {
128 LOG(info) << classname <<
" is standard layout";
130 LOG(info) << classname <<
" is not standard layout";
133 if (resolve::has_BoostSerialization<T,
void(Archive&,
const unsigned int)>::value) {
134 LOG(info) << classname <<
" is boost serializable";
136 if (resolve::has_BoostSerialization<T,
void(Archive&)>::value) {
137 LOG(info) << classname <<
" is boost serializable";
139 LOG(info) << classname <<
" has no void serialize(BoostArchive&) member";
143 LOG(info) << classname <<
" is not a class";