//////////////////////////////////////////////////////////////////////////// // lazy_argument_tests.cpp // // lazy argument tests passing lazy function as argument. // //////////////////////////////////////////////////////////////////////////// /*============================================================================= Copyright (c) 2001-2007 Joel de Guzman Copyright (c) 2015 John Fletcher Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include #include #include #include namespace example { struct G { template struct result; template struct result : boost::remove_reference {}; template T operator()(T t) const { return ++t; } }; } typedef boost::phoenix::function GG; boost::phoenix::function gg; template T h(F f, T const& t) { return f(t)(); } int main() { BOOST_TEST( h(gg,1) == 2); BOOST_TEST(( h(gg,1) == 2)); return boost::report_errors(); }