15 #ifndef OPENSCENARIO_INTERPRETER__FUNCTIONAL__EQUAL_TO_HPP_
16 #define OPENSCENARIO_INTERPRETER__FUNCTIONAL__EQUAL_TO_HPP_
21 #include <type_traits>
26 inline namespace syntax
28 template <
typename T,
typename =
void>
34 struct equal_to<T, typename
std::enable_if<std::is_floating_point<T>::value>::type>
36 constexpr
auto operator()(
const T & lhs,
const T & rhs)
const noexcept
38 return std::abs(lhs - rhs) < std::numeric_limits<typename std::decay<T>::type>::epsilon();
43 struct equal_to<
std::valarray<T>, typename std::enable_if<std::is_floating_point<T>::value>::type>
46 const std::valarray<T> & lhs,
const std::valarray<T> & rhs)
const noexcept
48 return std::abs(lhs - rhs) < std::numeric_limits<typename std::decay<T>::type>::epsilon();
51 constexpr
auto operator()(
const std::valarray<T> & lhs,
const T & rhs)
const noexcept
53 return std::abs(lhs - rhs) < std::numeric_limits<typename std::decay<T>::type>::epsilon();
56 constexpr
auto operator()(
const T & lhs,
const std::valarray<T> & rhs)
const noexcept
58 return std::abs(lhs - rhs) < std::numeric_limits<typename std::decay<T>::type>::epsilon();
Definition: escape_sequence.hpp:22
constexpr auto operator()(const T &lhs, const T &rhs) const noexcept
Definition: equal_to.hpp:36
constexpr auto operator()(const std::valarray< T > &lhs, const T &rhs) const noexcept
Definition: equal_to.hpp:51
constexpr auto operator()(const std::valarray< T > &lhs, const std::valarray< T > &rhs) const noexcept
Definition: equal_to.hpp:45
constexpr auto operator()(const T &lhs, const std::valarray< T > &rhs) const noexcept
Definition: equal_to.hpp:56
Definition: equal_to.hpp:30