New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
io.hpp in vendors/XIOS/current/extern/boost/include/boost/numeric/interval – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/numeric/interval/io.hpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 1.1 KB
Line 
1/* Boost interval/io.hpp header file
2 *
3 * This file is only meant to provide a quick
4 * implementation of the output operator. It is
5 * provided for test programs that aren't even
6 * interested in the precision of the results.
7 * A real progam should define its own operators
8 * and never include this header.
9 *
10 * Copyright 2003 Guillaume Melquiond
11 *
12 * Distributed under the Boost Software License, Version 1.0.
13 * (See accompanying file LICENSE_1_0.txt or
14 * copy at http://www.boost.org/LICENSE_1_0.txt)
15 */
16
17#ifndef BOOST_NUMERIC_INTERVAL_IO_HPP
18#define BOOST_NUMERIC_INTERVAL_IO_HPP
19
20#include <boost/numeric/interval/interval.hpp>
21#include <boost/numeric/interval/utility.hpp>
22#include <ostream>
23
24namespace boost {
25namespace numeric {
26
27template<class CharType, class CharTraits, class T, class Policies>
28std::basic_ostream<CharType, CharTraits> &operator<<
29  (std::basic_ostream<CharType, CharTraits> &stream,
30   interval<T, Policies> const &value)
31{
32  if (empty(value))
33    return stream << "[]";
34  else
35    return stream << '[' << lower(value) << ',' << upper(value) << ']';
36}
37
38} // namespace numeric
39} // namespace boost
40
41#endif // BOOST_NUMERIC_INTERVAL_IO_HPP
Note: See TracBrowser for help on using the repository browser.