PageRenderTime 26ms CodeModel.GetById 17ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/libs/phoenix/test/stdlib/cmath.cpp

http://hadesmem.googlecode.com/
C++ | 16 lines | 14 code | 2 blank | 0 comment | 0 complexity | a791b19942595156241dce0ad35d649d MD5 | raw file
 1#include <cmath>
 2#include <boost/function.hpp>
 3#include <boost/phoenix/core.hpp>
 4#include <boost/phoenix/operator.hpp>
 5#include <boost/phoenix/stl/cmath.hpp>
 6#include <boost/detail/lightweight_test.hpp>
 7
 8int main()
 9{
10    double eps = 0.000001;
11    using namespace boost::phoenix::arg_names;
12    boost::function<bool(double, double)> f = fabs(_1 - _2) < eps;
13
14    BOOST_TEST(f(0.0, 0 * eps));
15    BOOST_TEST(!f(0.0, eps));
16}