1/*=============================================================================
2 Copyright (c) 2014 John Fletcher
3 Distributed under the Boost Software License, Version 1.0. (See accompanying
4 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5==============================================================================*/
6
7#include <boost/phoenix.hpp>
8
9#include <boost/detail/lightweight_test.hpp>
10
11namespace phoenix = boost::phoenix;
12using namespace phoenix::local_names;
13using boost::phoenix::arg_names::_1;
14
15int main(int argc, char *argv[])
16{
17 int y = phoenix::lambda(_a=_1)
18 [
19 _a = 18
20 ](17)();
21 BOOST_TEST(y==18);
22
23 return boost::report_errors();
24}
25

source code of boost/libs/phoenix/test/scope/bug8298f.cpp