Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/boost/blank.hpp @ 13

Last change on this file since 13 was 12, checked in by landauf, 17 years ago

added boost

File size: 1.5 KB
Line 
1//-----------------------------------------------------------------------------
2// boost blank.hpp header file
3// See http://www.boost.org for updates, documentation, and revision history.
4//-----------------------------------------------------------------------------
5//
6// Copyright (c) 2003
7// Eric Friedman
8//
9// Distributed under the Boost Software License, Version 1.0. (See
10// accompanying file LICENSE_1_0.txt or copy at
11// http://www.boost.org/LICENSE_1_0.txt)
12
13#ifndef BOOST_BLANK_HPP
14#define BOOST_BLANK_HPP
15
16#include "boost/blank_fwd.hpp"
17
18#include <iosfwd> // for std::basic_ostream forward declare
19
20#include "boost/detail/templated_streams.hpp"
21#include "boost/mpl/bool.hpp"
22#include "boost/type_traits/is_empty.hpp"
23#include "boost/type_traits/is_pod.hpp"
24#include "boost/type_traits/is_stateless.hpp"
25
26namespace boost {
27
28struct blank
29{
30};
31
32// type traits specializations
33//
34
35template <>
36struct is_pod< blank >
37    : mpl::true_
38{
39};
40
41template <>
42struct is_empty< blank >
43    : mpl::true_
44{
45};
46
47template <>
48struct is_stateless< blank >
49    : mpl::true_
50{
51};
52
53// relational operators
54//
55
56inline bool operator==(const blank&, const blank&)
57{
58    return true;
59}
60
61inline bool operator<(const blank&, const blank&)
62{
63    return false;
64}
65
66// streaming support
67//
68BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
69inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
70      BOOST_TEMPLATED_STREAM(ostream, E,T)& out
71    , const blank&
72    )
73{
74    // (output nothing)
75    return out;
76}
77
78} // namespace boost
79
80#endif // BOOST_BLANK_HPP
Note: See TracBrowser for help on using the repository browser.