]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/test/function/lazy_argument_tests.cpp
1 ////////////////////////////////////////////////////////////////////////////
2 // lazy_argument_tests.cpp
4 // lazy argument tests passing lazy function as argument.
6 ////////////////////////////////////////////////////////////////////////////
7 /*=============================================================================
8 Copyright (c) 2001-2007 Joel de Guzman
9 Copyright (c) 2015 John Fletcher
11 Distributed under the Boost Software License, Version 1.0. (See accompanying
12 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
13 ==============================================================================*/
15 #include <boost/phoenix/core/limits.hpp>
17 #include <boost/detail/lightweight_test.hpp>
18 #include <boost/phoenix/core.hpp>
19 #include <boost/phoenix/function.hpp>
24 template <typename Sig
>
27 template <typename This
, typename A0
>
28 struct result
<This(A0
)>
29 : boost::remove_reference
<A0
>
33 T
operator()(T t
) const { return ++t
; }
38 typedef boost::phoenix::function
<example::G
> GG
;
39 boost::phoenix::function
<example::G
> gg
;
41 template <typename F
,typename T
>
49 BOOST_TEST( h(gg
,1) == 2);
50 BOOST_TEST(( h
<GG
,int>(gg
,1) == 2));
52 return boost::report_errors();