fix doc example typo
[boost.git] / boost / blank.hpp
blobf84f2d9ea0b368f61f991c9107d687a1bf08dbe9
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)
13 #ifndef BOOST_BLANK_HPP
14 #define BOOST_BLANK_HPP
16 #include "boost/blank_fwd.hpp"
18 #include <iosfwd> // for std::basic_ostream forward declare
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"
26 namespace boost {
28 struct blank
32 // type traits specializations
35 template <>
36 struct is_pod< blank >
37 : mpl::true_
41 template <>
42 struct is_empty< blank >
43 : mpl::true_
47 template <>
48 struct is_stateless< blank >
49 : mpl::true_
53 // relational operators
56 inline bool operator==(const blank&, const blank&)
58 return true;
61 inline bool operator<=(const blank&, const blank&)
63 return true;
66 inline bool operator>=(const blank&, const blank&)
68 return true;
71 inline bool operator!=(const blank&, const blank&)
73 return false;
76 inline bool operator<(const blank&, const blank&)
78 return false;
81 inline bool operator>(const blank&, const blank&)
83 return false;
86 // streaming support
88 BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
89 inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
90 BOOST_TEMPLATED_STREAM(ostream, E,T)& out
91 , const blank&
94 // (output nothing)
95 return out;
98 } // namespace boost
100 #endif // BOOST_BLANK_HPP