mirror of
https://github.com/boostorg/phoenix.git
synced 2026-01-31 08:22:15 +00:00
17 lines
424 B
C++
17 lines
424 B
C++
#include <cmath>
|
|
#include <boost/function.hpp>
|
|
#include <boost/phoenix/core.hpp>
|
|
#include <boost/phoenix/operator.hpp>
|
|
#include <boost/phoenix/stl/cmath.hpp>
|
|
#include <boost/detail/lightweight_test.hpp>
|
|
|
|
int main()
|
|
{
|
|
double eps = 0.000001;
|
|
using namespace boost::phoenix::arg_names;
|
|
boost::function<bool(double, double)> f = fabs(_1 - _2) < eps;
|
|
|
|
BOOST_TEST(f(0.0, 0 * eps));
|
|
BOOST_TEST(!f(0.0, eps));
|
|
}
|