Chris@16: /* Boost interval/io.hpp header file Chris@16: * Chris@16: * This file is only meant to provide a quick Chris@16: * implementation of the output operator. It is Chris@16: * provided for test programs that aren't even Chris@16: * interested in the precision of the results. Chris@16: * A real progam should define its own operators Chris@16: * and never include this header. Chris@16: * Chris@16: * Copyright 2003 Guillaume Melquiond Chris@16: * Chris@16: * Distributed under the Boost Software License, Version 1.0. Chris@16: * (See accompanying file LICENSE_1_0.txt or Chris@16: * copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: */ Chris@16: Chris@16: #ifndef BOOST_NUMERIC_INTERVAL_IO_HPP Chris@16: #define BOOST_NUMERIC_INTERVAL_IO_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace numeric { Chris@16: Chris@16: template Chris@16: std::basic_ostream &operator<< Chris@16: (std::basic_ostream &stream, Chris@16: interval const &value) Chris@16: { Chris@16: if (empty(value)) Chris@16: return stream << "[]"; Chris@16: else Chris@16: return stream << '[' << lower(value) << ',' << upper(value) << ']'; Chris@16: } Chris@16: Chris@16: } // namespace numeric Chris@16: } // namespace boost Chris@16: Chris@16: #endif // BOOST_NUMERIC_INTERVAL_IO_HPP