1 | /*============================================================================= |
---|---|
2 | Copyright (c) 2001-2007 Joel de Guzman |
3 | Copyright (c) 2014 John Fletcher |
4 | Copyright (c) 2018 Kohei Takahashi |
5 | |
6 | Distributed under the Boost Software License, Version 1.0. (See accompanying |
7 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
8 | ==============================================================================*/ |
9 | #include <boost/detail/lightweight_test.hpp> |
10 | #include <boost/phoenix/core.hpp> |
11 | #include <boost/phoenix/operator/self.hpp> |
12 | #include <boost/phoenix/scope/lambda.hpp> |
13 | #include <boost/phoenix/scope/let.hpp> |
14 | |
15 | int main() |
16 | { |
17 | using boost::phoenix::lambda; |
18 | using boost::phoenix::let; |
19 | using boost::phoenix::arg_names::_1; |
20 | using boost::phoenix::arg_names::_2; |
21 | using boost::phoenix::local_names::_a; |
22 | |
23 | int i = 0; |
24 | int j = 2; |
25 | BOOST_TEST(lambda[let(_a = _1)[_a = _2]]()(i, j) == j); |
26 | BOOST_TEST(i == j); |
27 | |
28 | return boost::report_errors(); |
29 | } |
30 |