Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/blank.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //-----------------------------------------------------------------------------
0002 // boost blank.hpp header file
0003 // See http://www.boost.org for updates, documentation, and revision history.
0004 //-----------------------------------------------------------------------------
0005 //
0006 // Copyright (c) 2003
0007 // Eric Friedman
0008 //
0009 // Distributed under the Boost Software License, Version 1.0. (See
0010 // accompanying file LICENSE_1_0.txt or copy at
0011 // http://www.boost.org/LICENSE_1_0.txt)
0012 
0013 #ifndef BOOST_BLANK_HPP
0014 #define BOOST_BLANK_HPP
0015 
0016 #include "boost/blank_fwd.hpp"
0017 
0018 #if !defined(BOOST_NO_IOSTREAM)
0019 #include <iosfwd> // for std::basic_ostream forward declare
0020 #include "boost/detail/templated_streams.hpp"
0021 #endif // BOOST_NO_IOSTREAM
0022 
0023 #include "boost/type_traits/integral_constant.hpp"
0024 #include "boost/type_traits/is_empty.hpp"
0025 #include "boost/type_traits/is_pod.hpp"
0026 #include "boost/type_traits/is_stateless.hpp"
0027 
0028 namespace boost {
0029 
0030 struct blank
0031 {
0032 };
0033 
0034 // type traits specializations
0035 //
0036 
0037 template <>
0038 struct is_pod< blank >
0039     : boost::true_type
0040 {
0041 };
0042 
0043 template <>
0044 struct is_empty< blank >
0045     : boost::true_type
0046 {
0047 };
0048 
0049 template <>
0050 struct is_stateless< blank >
0051     : boost::true_type
0052 {
0053 };
0054 
0055 // relational operators
0056 //
0057 
0058 inline bool operator==(const blank&, const blank&)
0059 {
0060     return true;
0061 }
0062 
0063 inline bool operator<=(const blank&, const blank&)
0064 {
0065     return true;
0066 }
0067 
0068 inline bool operator>=(const blank&, const blank&)
0069 {
0070     return true;
0071 }
0072 
0073 inline bool operator!=(const blank&, const blank&)
0074 {
0075     return false;
0076 }
0077 
0078 inline bool operator<(const blank&, const blank&)
0079 {
0080     return false;
0081 }
0082 
0083 inline bool operator>(const blank&, const blank&)
0084 {
0085     return false;
0086 }
0087 
0088 // streaming support
0089 //
0090 #if !defined(BOOST_NO_IOSTREAM)
0091 
0092 BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
0093 inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
0094       BOOST_TEMPLATED_STREAM(ostream, E,T)& out
0095     , const blank&
0096     )
0097 {
0098     // (output nothing)
0099     return out;
0100 }
0101 
0102 #endif // BOOST_NO_IOSTREAM
0103 
0104 } // namespace boost
0105 
0106 #endif // BOOST_BLANK_HPP