references.cpp 607 B

1234567891011121314151617181920
  1. /*=============================================================================
  2. Copyright (c) 2001-2007 Joel de Guzman
  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 <iostream>
  7. #include <boost/phoenix/core.hpp>
  8. int
  9. main()
  10. {
  11. using boost::phoenix::ref;
  12. int i = 3;
  13. char const* s = "Hello World";
  14. std::cout << ref(i)() << std::endl;
  15. std::cout << ref(s)() << std::endl;
  16. return 0;
  17. }