sl@0: //----------------------------------------------------------------------------- sl@0: // boost blank.hpp header file sl@0: // See http://www.boost.org for updates, documentation, and revision history. sl@0: //----------------------------------------------------------------------------- sl@0: // sl@0: // Copyright (c) 2003 sl@0: // Eric Friedman sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: #ifndef BOOST_BLANK_HPP sl@0: #define BOOST_BLANK_HPP sl@0: sl@0: #include "boost/blank_fwd.hpp" sl@0: sl@0: #include // for std::basic_ostream forward declare sl@0: sl@0: #include "boost/detail/templated_streams.hpp" sl@0: #include "boost/mpl/bool.hpp" sl@0: #include "boost/type_traits/is_empty.hpp" sl@0: #include "boost/type_traits/is_pod.hpp" sl@0: #include "boost/type_traits/is_stateless.hpp" sl@0: sl@0: namespace boost { sl@0: sl@0: struct blank sl@0: { sl@0: }; sl@0: sl@0: // type traits specializations sl@0: // sl@0: sl@0: template <> sl@0: struct is_pod< blank > sl@0: : mpl::true_ sl@0: { sl@0: }; sl@0: sl@0: template <> sl@0: struct is_empty< blank > sl@0: : mpl::true_ sl@0: { sl@0: }; sl@0: sl@0: template <> sl@0: struct is_stateless< blank > sl@0: : mpl::true_ sl@0: { sl@0: }; sl@0: sl@0: // relational operators sl@0: // sl@0: sl@0: inline bool operator==(const blank&, const blank&) sl@0: { sl@0: return true; sl@0: } sl@0: sl@0: inline bool operator<=(const blank&, const blank&) sl@0: { sl@0: return true; sl@0: } sl@0: sl@0: inline bool operator>=(const blank&, const blank&) sl@0: { sl@0: return true; sl@0: } sl@0: sl@0: inline bool operator!=(const blank&, const blank&) sl@0: { sl@0: return false; sl@0: } sl@0: sl@0: inline bool operator<(const blank&, const blank&) sl@0: { sl@0: return false; sl@0: } sl@0: sl@0: inline bool operator>(const blank&, const blank&) sl@0: { sl@0: return false; sl@0: } sl@0: sl@0: // streaming support sl@0: // sl@0: BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) sl@0: inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<( sl@0: BOOST_TEMPLATED_STREAM(ostream, E,T)& out sl@0: , const blank& sl@0: ) sl@0: { sl@0: // (output nothing) sl@0: return out; sl@0: } sl@0: sl@0: } // namespace boost sl@0: sl@0: #endif // BOOST_BLANK_HPP