os/ossrv/ossrv_pub/boost_apis/boost/numeric/interval/io.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/numeric/interval/io.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,41 @@
     1.4 +/* Boost interval/io.hpp header file
     1.5 + *
     1.6 + * This file is only meant to provide a quick
     1.7 + * implementation of the output operator. It is
     1.8 + * provided for test programs that aren't even
     1.9 + * interested in the precision of the results.
    1.10 + * A real progam should define its own operators
    1.11 + * and never include this header.
    1.12 + *
    1.13 + * Copyright 2003 Guillaume Melquiond
    1.14 + *
    1.15 + * Distributed under the Boost Software License, Version 1.0.
    1.16 + * (See accompanying file LICENSE_1_0.txt or
    1.17 + * copy at http://www.boost.org/LICENSE_1_0.txt)
    1.18 + */
    1.19 +
    1.20 +#ifndef BOOST_NUMERIC_INTERVAL_IO_HPP
    1.21 +#define BOOST_NUMERIC_INTERVAL_IO_HPP
    1.22 +
    1.23 +#include <boost/numeric/interval/interval.hpp>
    1.24 +#include <boost/numeric/interval/utility.hpp>
    1.25 +#include <ostream>
    1.26 +
    1.27 +namespace boost {
    1.28 +namespace numeric {
    1.29 +
    1.30 +template<class CharType, class CharTraits, class T, class Policies>
    1.31 +std::basic_ostream<CharType, CharTraits> &operator<<
    1.32 +  (std::basic_ostream<CharType, CharTraits> &stream,
    1.33 +   interval<T, Policies> const &value)
    1.34 +{
    1.35 +  if (empty(value))
    1.36 +    return stream << "[]";
    1.37 +  else
    1.38 +    return stream << '[' << lower(value) << ',' << upper(value) << ']';
    1.39 +}
    1.40 +
    1.41 +} // namespace numeric
    1.42 +} // namespace boost
    1.43 +
    1.44 +#endif // BOOST_NUMERIC_INTERVAL_IO_HPP