1/*=============================================================================
2 Copyright (c) 2001-2007 Joel de Guzman
3 Copyright (c) 2014 John Fletcher
4 Copyright (c) 2018 Kohei Takahshi
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/operator/arithmetic.hpp>
16#include <boost/phoenix/scope/lambda.hpp>
17
18int main()
19{
20#if defined(RUNNING_ON_APPVEYOR) && BOOST_WORKAROUND(BOOST_MSVC, == 1800)
21 // skip test
22#else
23 using boost::phoenix::lambda;
24 using boost::phoenix::arg_names::_1;
25 using boost::phoenix::local_names::_a;
26
27 int x = 1, y = 10;
28 BOOST_TEST(
29 (_1 + lambda(_a = _1)[_a + lambda[_a + 2]])(x)()(x) == 1+1+1+2
30 );
31
32 return boost::report_errors();
33#endif
34}
35

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