1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef BOOST_NUMERIC_INTERVAL_IO_HPP
- #define BOOST_NUMERIC_INTERVAL_IO_HPP
- #include <boost/numeric/interval/interval.hpp>
- #include <boost/numeric/interval/utility.hpp>
- #include <ostream>
- namespace boost {
- namespace numeric {
- template<class CharType, class CharTraits, class T, class Policies>
- std::basic_ostream<CharType, CharTraits> &operator<<
- (std::basic_ostream<CharType, CharTraits> &stream,
- interval<T, Policies> const &value)
- {
- if (empty(value))
- return stream << "[]";
- else
- return stream << '[' << lower(value) << ',' << upper(value) << ']';
- }
- }
- }
- #endif
|