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