2
0
mirror of https://github.com/boostorg/phoenix.git synced 2026-01-30 20:12:24 +00:00
Files
phoenix/test/stdlib/cmath.cpp
2011-05-13 19:14:18 +00:00

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));
}