Commit b35e41a8 authored by Dominik Charousset's avatar Dominik Charousset

Remove unnecessary includes

parent 8dbf1266
......@@ -17,19 +17,13 @@
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#ifndef CAF_DETAIL_SPLIT_HPP
#define CAF_DETAIL_SPLIT_HPP
#ifndef CAF_DETAIL_SAFE_EQUAL_HPP
#define CAF_DETAIL_SAFE_EQUAL_HPP
#include <cmath> // fabs
#include <string>
#include <vector>
#include <limits>
#include <sstream>
#include <algorithm>
#include <type_traits>
#include "caf/detail/type_traits.hpp"
namespace caf {
namespace detail {
......@@ -39,18 +33,18 @@ namespace detail {
* performs an epsilon comparison.
*/
template <class T, typename U>
typename std::enable_if< !std::is_floating_point<T>::value
&& !std::is_floating_point<U>::value,
bool
typename std::enable_if<
!std::is_floating_point<T>::value && !std::is_floating_point<U>::value,
bool
>::type
safe_equal(const T& lhs, const U& rhs) {
return lhs == rhs;
}
template <class T, typename U>
typename std::enable_if< std::is_floating_point<T>::value
|| std::is_floating_point<U>::value,
bool
typename std::enable_if<
std::is_floating_point<T>::value || std::is_floating_point<U>::value,
bool
>::type
safe_equal(const T& lhs, const U& rhs) {
using res_type = decltype(lhs - rhs);
......@@ -60,4 +54,4 @@ safe_equal(const T& lhs, const U& rhs) {
} // namespace detail
} // namespace caf
#endif // CAF_DETAIL_SPLIT_HPP
#endif // CAF_DETAIL_SAFE_EQUAL_HPP
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment