os/ossrv/ossrv_pub/boost_apis/boost/blank.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
//-----------------------------------------------------------------------------
sl@0
     2
// boost blank.hpp header file
sl@0
     3
// See http://www.boost.org for updates, documentation, and revision history.
sl@0
     4
//-----------------------------------------------------------------------------
sl@0
     5
//
sl@0
     6
// Copyright (c) 2003
sl@0
     7
// Eric Friedman
sl@0
     8
//
sl@0
     9
// Distributed under the Boost Software License, Version 1.0. (See
sl@0
    10
// accompanying file LICENSE_1_0.txt or copy at
sl@0
    11
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
    12
sl@0
    13
#ifndef BOOST_BLANK_HPP
sl@0
    14
#define BOOST_BLANK_HPP
sl@0
    15
sl@0
    16
#include "boost/blank_fwd.hpp"
sl@0
    17
sl@0
    18
#include <iosfwd> // for std::basic_ostream forward declare
sl@0
    19
sl@0
    20
#include "boost/detail/templated_streams.hpp"
sl@0
    21
#include "boost/mpl/bool.hpp"
sl@0
    22
#include "boost/type_traits/is_empty.hpp"
sl@0
    23
#include "boost/type_traits/is_pod.hpp"
sl@0
    24
#include "boost/type_traits/is_stateless.hpp"
sl@0
    25
sl@0
    26
namespace boost {
sl@0
    27
sl@0
    28
struct blank
sl@0
    29
{
sl@0
    30
};
sl@0
    31
sl@0
    32
// type traits specializations
sl@0
    33
//
sl@0
    34
sl@0
    35
template <>
sl@0
    36
struct is_pod< blank >
sl@0
    37
    : mpl::true_
sl@0
    38
{
sl@0
    39
};
sl@0
    40
sl@0
    41
template <>
sl@0
    42
struct is_empty< blank >
sl@0
    43
    : mpl::true_
sl@0
    44
{
sl@0
    45
};
sl@0
    46
sl@0
    47
template <>
sl@0
    48
struct is_stateless< blank >
sl@0
    49
    : mpl::true_
sl@0
    50
{
sl@0
    51
};
sl@0
    52
sl@0
    53
// relational operators
sl@0
    54
//
sl@0
    55
sl@0
    56
inline bool operator==(const blank&, const blank&)
sl@0
    57
{
sl@0
    58
    return true;
sl@0
    59
}
sl@0
    60
sl@0
    61
inline bool operator<=(const blank&, const blank&)
sl@0
    62
{
sl@0
    63
    return true;
sl@0
    64
}
sl@0
    65
sl@0
    66
inline bool operator>=(const blank&, const blank&)
sl@0
    67
{
sl@0
    68
    return true;
sl@0
    69
}
sl@0
    70
sl@0
    71
inline bool operator!=(const blank&, const blank&)
sl@0
    72
{
sl@0
    73
    return false;
sl@0
    74
}
sl@0
    75
sl@0
    76
inline bool operator<(const blank&, const blank&)
sl@0
    77
{
sl@0
    78
    return false;
sl@0
    79
}
sl@0
    80
sl@0
    81
inline bool operator>(const blank&, const blank&)
sl@0
    82
{
sl@0
    83
    return false;
sl@0
    84
}
sl@0
    85
sl@0
    86
// streaming support
sl@0
    87
//
sl@0
    88
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
sl@0
    89
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
sl@0
    90
      BOOST_TEMPLATED_STREAM(ostream, E,T)& out
sl@0
    91
    , const blank&
sl@0
    92
    )
sl@0
    93
{
sl@0
    94
    // (output nothing)
sl@0
    95
    return out;
sl@0
    96
}
sl@0
    97
sl@0
    98
} // namespace boost
sl@0
    99
sl@0
   100
#endif // BOOST_BLANK_HPP