]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 1999-2003 Jaakko Jarvi | |
3 | Copyright (c) 1999-2003 Jeremiah Willcock | |
4 | Copyright (c) 2001-2011 Joel de Guzman | |
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 | #if !defined(BOOST_OUT_05042005_0120) | |
10 | #define BOOST_OUT_05042005_0120 | |
11 | ||
12 | #include <boost/fusion/support/config.hpp> | |
13 | #include <ostream> | |
14 | #include <boost/fusion/sequence/io/detail/out.hpp> | |
15 | #include <boost/fusion/support/is_sequence.hpp> | |
16 | #include <boost/utility/enable_if.hpp> | |
17 | #include <boost/mpl/or.hpp> | |
18 | ||
19 | namespace boost { namespace fusion | |
20 | { | |
21 | template <typename Sequence> | |
22 | inline std::ostream& | |
23 | out(std::ostream& os, Sequence& seq) | |
24 | { | |
25 | detail::print_sequence(os, seq); | |
26 | return os; | |
27 | } | |
28 | ||
29 | namespace operators | |
30 | { | |
31 | template <typename Sequence> | |
32 | inline typename | |
33 | boost::enable_if< | |
34 | fusion::traits::is_sequence<Sequence> | |
35 | , std::ostream& | |
36 | >::type | |
37 | operator<<(std::ostream& os, Sequence const& seq) | |
38 | { | |
39 | return fusion::out(os, seq); | |
40 | } | |
41 | } | |
42 | using operators::operator<<; | |
43 | }} | |
44 | ||
45 | #endif |