/*============================================================================= Copyright (c) 2001-2007 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #ifndef PHOENIX_OPERATOR_IO_HPP #define PHOENIX_OPERATOR_IO_HPP #include namespace boost { namespace phoenix { /////////////////////////////////////////////////////////////////////////////// // // overloads for std::basic_ostream and std::basic_istream // /////////////////////////////////////////////////////////////////////////////// template inline typename detail::enable_if_ostream::type operator<<(T0& a0, actor const& a1) { return compose(phoenix::ref(a0), a1); } template inline typename detail::enable_if_istream::type operator>>(T0& a0, actor const& a1) { return compose(phoenix::ref(a0), a1); } // resolve ambiguities with fusion. template inline typename detail::enable_if_ostream::type operator<<(std::ostream& a0, actor const& a1) { return compose(phoenix::ref(a0), a1); } template inline typename detail::enable_if_istream::type operator>>(std::istream& a0, actor const& a1) { return compose(phoenix::ref(a0), a1); } /////////////////////////////////////////////////////////////////////////////// // // overloads for I/O manipulators. // /////////////////////////////////////////////////////////////////////////////// template inline actor, detail::omanip_type>::type> operator<<(actor const& a0, detail::omanip_type a1) { return compose(a0, a1); } template inline actor, detail::iomanip_type>::type> operator<<(actor const& a0, detail::iomanip_type a1) { return compose(a0, a1); } template inline actor, detail::imanip_type>::type> operator>>(actor const& a0, detail::imanip_type a1) { return compose(a0, a1); } template inline actor, detail::iomanip_type>::type> operator>>(actor const& a0, detail::iomanip_type a1) { return compose(a0, a1); } }} #endif