]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/example/if.cpp
1 /*=============================================================================
2 Copyright (c) 2001-2007 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
10 #include <boost/phoenix/statement.hpp>
11 #include <boost/phoenix/operator.hpp>
12 #include <boost/phoenix/core.hpp>
17 using boost::phoenix::if_
;
18 using boost::phoenix::arg_names::arg1
;
20 int init
[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
21 std::vector
<int> v(init
, init
+10);
23 std::cout
<< std::dec
;
26 std::for_each(v
.begin(), v
.end(),
29 std::cout
<< arg1
<< ", "
33 std::cout
<< std::endl
;