Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:49:07

0001 /* Boost interval/io.hpp header file
0002  *
0003  * This file is only meant to provide a quick
0004  * implementation of the output operator. It is
0005  * provided for test programs that aren't even
0006  * interested in the precision of the results.
0007  * A real progam should define its own operators
0008  * and never include this header.
0009  *
0010  * Copyright 2003 Guillaume Melquiond
0011  *
0012  * Distributed under the Boost Software License, Version 1.0.
0013  * (See accompanying file LICENSE_1_0.txt or
0014  * copy at http://www.boost.org/LICENSE_1_0.txt)
0015  */
0016 
0017 #ifndef BOOST_NUMERIC_INTERVAL_IO_HPP
0018 #define BOOST_NUMERIC_INTERVAL_IO_HPP
0019 
0020 #include <boost/numeric/interval/interval.hpp>
0021 #include <boost/numeric/interval/utility.hpp>
0022 #include <ostream>
0023 
0024 namespace boost {
0025 namespace numeric {
0026 
0027 template<class CharType, class CharTraits, class T, class Policies>
0028 std::basic_ostream<CharType, CharTraits> &operator<<
0029   (std::basic_ostream<CharType, CharTraits> &stream,
0030    interval<T, Policies> const &value)
0031 {
0032   if (empty(value))
0033     return stream << "[]";
0034   else
0035     return stream << '[' << lower(value) << ',' << upper(value) << ']';
0036 }
0037 
0038 } // namespace numeric
0039 } // namespace boost
0040 
0041 #endif // BOOST_NUMERIC_INTERVAL_IO_HPP