PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/libs/phoenix/example/references.cpp

http://hadesmem.googlecode.com/
C++ | 20 lines | 12 code | 2 blank | 6 comment | 0 complexity | bce7eda2193c96177b7b89e24bdeb9b8 MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2007 Joel de Guzman
 3
 4    Distributed under the Boost Software License, Version 1.0. (See accompanying 
 5    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 6==============================================================================*/
 7#include <iostream>
 8#include <boost/phoenix/core.hpp>
 9
10int
11main()
12{
13    using boost::phoenix::ref;
14
15    int i = 3;
16    char const* s = "Hello World";
17    std::cout << ref(i)() << std::endl;
18    std::cout << ref(s)() << std::endl;
19    return 0;
20}