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/config.hpp>
10#include <boost/detail/workaround.hpp>
11
12#include <boost/detail/lightweight_test.hpp>
13#include <boost/phoenix/core.hpp>
14#include <boost/phoenix/operator/self.hpp>
15#include <boost/phoenix/bind.hpp>
16#include <boost/phoenix/scope/lambda.hpp>
17#include <boost/phoenix/scope/let.hpp>
18
19int main()
20{
21 using boost::phoenix::lambda;
22 using boost::phoenix::let;
23 using boost::phoenix::val;
24 using boost::phoenix::local_names::_a;
25
26 int x = (let(a: _a = lambda[val(t: 1)])[bind(f: _a)])();
27 BOOST_TEST(x == 1);
28
29 return boost::report_errors();
30}
31

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