]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================== |
2 | Copyright (c) 2005-2010 Joel de Guzman | |
3 | Copyright (c) 2010 Thomas Heller | |
4 | Copyright (c) 2014 John Fletcher | |
5 | ||
6 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
7 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
8 | ==============================================================================*/ | |
9 | #ifndef BOOST_PHOENIX_CORE_DEBUG_HPP | |
10 | #define BOOST_PHOENIX_CORE_DEBUG_HPP | |
11 | ||
12 | #include <iostream> | |
13 | #include <boost/phoenix/version.hpp> | |
14 | // Some other things may be needed here... | |
15 | ||
16 | // Include all proto for the time being... | |
17 | #include <boost/proto/proto.hpp> | |
18 | ||
19 | namespace boost { namespace phoenix | |
20 | { | |
21 | ||
22 | // For now just drop through to the Proto versions. | |
23 | ||
24 | /// \brief Pretty-print a Phoenix expression tree using the Proto code. | |
25 | /// | |
26 | /// \note Equivalent to <tt>functional::display_expr(0, sout)(expr)</tt> | |
27 | /// \param expr The Phoenix expression tree to pretty-print | |
28 | /// \param sout The \c ostream to which the output should be | |
29 | /// written. If not specified, defaults to | |
30 | /// <tt>std::cout</tt>. | |
31 | template<typename Expr> | |
32 | void display_expr(Expr const &expr, std::ostream &sout) | |
33 | { | |
34 | boost::proto::display_expr(expr,sout); | |
35 | } | |
36 | ||
37 | /// \overload | |
38 | /// | |
39 | template<typename Expr> | |
40 | void display_expr(Expr const &expr) | |
41 | { | |
42 | boost::proto::display_expr(expr); | |
43 | } | |
44 | ||
45 | } // namespace phoenix | |
46 | } // namespace boost | |
47 | ||
48 | ||
49 | ||
50 | #endif |