mirror of
https://github.com/boostorg/core.git
synced 2025-05-10 07:13:54 +00:00
Remove unnecessary includes, add const
This commit is contained in:
parent
e155e13084
commit
544fd495e5
@ -8,16 +8,14 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
#include <functional>
|
|
||||||
#include <vector>
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct with_tolerance
|
struct with_tolerance
|
||||||
{
|
{
|
||||||
with_tolerance(T tolerance) : tolerance(tolerance) {}
|
with_tolerance(T tolerance) : tolerance(tolerance) {}
|
||||||
bool operator()(T lhs, T rhs)
|
bool operator()(T lhs, T rhs) const
|
||||||
{
|
{
|
||||||
return (std::abs(lhs - rhs) <= tolerance);
|
return (std::abs(lhs - rhs) <= tolerance);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user