PageRenderTime 25ms CodeModel.GetById 20ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://hadesmem.googlecode.com/
C++ | 24 lines | 15 code | 3 blank | 6 comment | 0 complexity | fded3387bc2949f027e654b5a26da5fb 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
10template <typename F>
11void print(F f)
12{
13    std::cout << f() << std::endl;
14}
15
16int
17main()
18{
19    using boost::phoenix::val;
20
21    print(val(3));
22    print(val("Hello World"));
23    return 0;
24}