bug8298f.cpp 694 B

123456789101112131415161718192021222324
  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. #include <boost/phoenix.hpp>
  7. #include <boost/detail/lightweight_test.hpp>
  8. namespace phoenix = boost::phoenix;
  9. using namespace phoenix::local_names;
  10. using boost::phoenix::arg_names::_1;
  11. int main(int argc, char *argv[])
  12. {
  13. int y = phoenix::lambda(_a=_1)
  14. [
  15. _a = 18
  16. ](17)();
  17. BOOST_TEST(y==18);
  18. return boost::report_errors();
  19. }