]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/spirit/classic/phoenix/example/fundamental/sample5.cpp
1 /*=============================================================================
3 Copyright (c) 2001-2003 Joel de Guzman
5 Use, modification and distribution is subject to the Boost Software
6 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
8 ==============================================================================*/
12 #include <boost/spirit/include/phoenix1_operators.hpp>
13 #include <boost/spirit/include/phoenix1_primitives.hpp>
16 using namespace phoenix
;
18 //////////////////////////////////
22 template <typename TupleT
>
23 struct result
{ typedef int type
; };
25 template <typename TupleT
>
26 int eval(TupleT
const&) const { return N
; }
29 //////////////////////////////////
31 phoenix::actor
<static_int
<N
> >
34 return static_int
<N
>();
37 //////////////////////////////////
41 cout
<< (int_const
<5>() + int_const
<6>())() << endl
;