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