lambda.cpp 510 B

1234567891011121314151617
  1. //[ Lambda
  2. ///////////////////////////////////////////////////////////////////////////////
  3. // Copyright 2008 Eric Niebler. Distributed under the Boost
  4. // Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // This example builds a simple but functional lambda library using Proto.
  8. #include <iostream>
  9. #include "./lambda.hpp"
  10. int main()
  11. {
  12. using namespace boost::lambda;
  13. int i = (_1 + _1)(42);
  14. std::cout << i << std::endl;
  15. }