16 #include <forward_list>
19 #include <unordered_set>
21 #include <unordered_map>
29 namespace serialization {
47 struct access<
T, typename std::enable_if<std::is_integral<T>::value or std::is_enum<T>::value>
::type> {
52 struct access<
T, typename std::enable_if<std::is_floating_point<T>::value>
::type> {
58 if (std::isinf(first)
or std::isinf(second))
59 return std::isinf(first) and std::isinf(second) and std::signbit(first) == std::signbit(second);
71 template <std::
size_t N>
76 template <
typename T,
typename U>
79 return equal(first.first, second.first) and
equal(first.second, second.second);
83 template <std::size_t
N,
typename... Ts>
86 if (not
equal(std::get<N - 1>(first), std::get<N - 1>(second)))
93 template <
typename... Ts>
95 static bool equal_(
const std::tuple<Ts...>&
first,
const std::tuple<Ts...>&
second) {
return true; }
98 template <
typename... Ts>
101 return equal_tuple<
sizeof...(Ts), Ts...>::equal_(first, second);
105 template <
typename T>
106 struct access<
T, typename std::enable_if<std::is_pointer<T>::value>
::type> {
108 if (first ==
nullptr or second ==
nullptr)
115 return first == second
or equal(*first, *second);
119 #define equal_pointer(TYPE) \
120 template <typename T> \
121 struct access<TYPE<T>> { \
122 static bool equal_(const TYPE<T>& first, const TYPE<T>& second) { return equal(first.get(), second.get()); } \
129 template <
typename T, std::
size_t N>
132 for (std::size_t
i = 0;
i <
N; ++
i)
139 template <
typename T, std::
size_t N>
142 for (std::size_t
i = 0;
i <
N; ++
i)
143 if (not
equal(first[
i], second[i]))
149 #define equal_sequence(TYPE) \
150 template <typename T> \
151 struct access<TYPE<T>> { \
152 static bool equal_(const TYPE<T>& first, const TYPE<T>& second) { \
153 return first.size() == second.size() && \
154 std::equal(first.cbegin(), \
157 [](decltype(*first.cbegin()) a, decltype(*first.cbegin()) b) -> bool { return equal(a, b); }); \
166 #undef equal_sequence
170 template <
typename T>
173 auto first_it = first.cbegin();
174 auto second_it = second.cbegin();
176 while (first_it != first.cend() and second_it != second.cend()) {
177 if (not
equal(*first_it, *second_it))
183 return first_it == first.cend() and second_it == second.cend();
188 #define equal_mapping(TYPE) \
189 template <typename T, typename U> \
190 struct access<TYPE<T, U>> { \
191 static bool equal_(const TYPE<T, U>& first, const TYPE<T, U>& second) { \
192 return first.size() == second.size() && \
193 std::equal(first.cbegin(), \
196 [](decltype(*first.cbegin()) a, decltype(*first.cbegin()) b) -> bool { return equal(a, b); }); \
203 #define equal_unorderedmapping(TYPE) \
204 template <typename T, typename U> \
205 struct access<TYPE<T, U>> { \
206 static bool equal_(const TYPE<T, U>& first, const TYPE<T, U>& second) { \
207 if (first.size() != second.size()) \
210 auto first_it = first.cbegin(); \
211 while (first_it != first.cend()) { \
212 auto second_it = second.find(first_it->first); \
213 if (second_it == second.cend()) \
215 if (not equal(first_it->second, second_it->second)) \
224 #undef equal_unorderedmapping
static bool equal_(const std::tuple< Ts...> &first, const std::tuple< Ts...> &second)
static bool equal_(const T first, const T second)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static bool equal_(const std::tuple< Ts...> &first, const std::tuple< Ts...> &second)
#define equal_sequence(TYPE)
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
bool equal(const T &first, const T &second)
U second(std::pair< T, U > const &p)
static bool equal_(const std::tuple< Ts...> &first, const std::tuple< Ts...> &second)
static bool equal_(const std::bitset< N > &first, const std::bitset< N > &second)
static bool equal_(const T(&first)[N], const T(&second)[N])
static bool equal_(const std::array< T, N > &first, const std::array< T, N > &second)
#define equal_mapping(TYPE)
static bool equal_(const std::string &first, const std::string &second)
static bool equal_(const std::forward_list< T > &first, const std::forward_list< T > &second)
#define equal_pointer(TYPE)
static bool equal_(const T first, const T second)
static bool equal_(const std::pair< T, U > &first, const std::pair< T, U > &second)
static bool equal_(const T first, const T second)
#define equal_unorderedmapping(TYPE)