2
0
mirror of https://github.com/boostorg/phoenix.git synced 2026-02-15 01:12:09 +00:00
Files
phoenix/test/stdlib/cmath.cpp
Thomas Heller 972c007705 [phoenix]
- patch by Daniel James
	- cmath functionality by Steven Watanabe



[SVN r70197]
2011-03-19 16:30:47 +00:00

17 lines
427 B
C++

#include <cmath>
#include <boost/function.hpp>
#include <boost/phoenix/core.hpp>
#include <boost/phoenix/operator.hpp>
#include <boost/phoenix/stdlib/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));
}