Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 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 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 13 | #ifndef NDNBOOST_BLANK_HPP |
| 14 | #define NDNBOOST_BLANK_HPP |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 15 | |
| 16 | #include "ndnboost/blank_fwd.hpp" |
| 17 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 18 | #if !defined(NDNBOOST_NO_IOSTREAM) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 19 | #include <iosfwd> // for std::basic_ostream forward declare |
| 20 | #include "ndnboost/detail/templated_streams.hpp" |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 21 | #endif // NDNBOOST_NO_IOSTREAM |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 22 | |
| 23 | #include "ndnboost/mpl/bool.hpp" |
| 24 | #include "ndnboost/type_traits/is_empty.hpp" |
| 25 | #include "ndnboost/type_traits/is_pod.hpp" |
| 26 | #include "ndnboost/type_traits/is_stateless.hpp" |
| 27 | |
| 28 | namespace ndnboost { |
| 29 | |
| 30 | struct blank |
| 31 | { |
| 32 | }; |
| 33 | |
| 34 | // type traits specializations |
| 35 | // |
| 36 | |
| 37 | template <> |
| 38 | struct is_pod< blank > |
| 39 | : mpl::true_ |
| 40 | { |
| 41 | }; |
| 42 | |
| 43 | template <> |
| 44 | struct is_empty< blank > |
| 45 | : mpl::true_ |
| 46 | { |
| 47 | }; |
| 48 | |
| 49 | template <> |
| 50 | struct is_stateless< blank > |
| 51 | : mpl::true_ |
| 52 | { |
| 53 | }; |
| 54 | |
| 55 | // relational operators |
| 56 | // |
| 57 | |
| 58 | inline bool operator==(const blank&, const blank&) |
| 59 | { |
| 60 | return true; |
| 61 | } |
| 62 | |
| 63 | inline bool operator<=(const blank&, const blank&) |
| 64 | { |
| 65 | return true; |
| 66 | } |
| 67 | |
| 68 | inline bool operator>=(const blank&, const blank&) |
| 69 | { |
| 70 | return true; |
| 71 | } |
| 72 | |
| 73 | inline bool operator!=(const blank&, const blank&) |
| 74 | { |
| 75 | return false; |
| 76 | } |
| 77 | |
| 78 | inline bool operator<(const blank&, const blank&) |
| 79 | { |
| 80 | return false; |
| 81 | } |
| 82 | |
| 83 | inline bool operator>(const blank&, const blank&) |
| 84 | { |
| 85 | return false; |
| 86 | } |
| 87 | |
| 88 | // streaming support |
| 89 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 90 | #if !defined(NDNBOOST_NO_IOSTREAM) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 91 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 92 | NDNBOOST_TEMPLATED_STREAM_TEMPLATE(E,T) |
| 93 | inline NDNBOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<( |
| 94 | NDNBOOST_TEMPLATED_STREAM(ostream, E,T)& out |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 95 | , const blank& |
| 96 | ) |
| 97 | { |
| 98 | // (output nothing) |
| 99 | return out; |
| 100 | } |
| 101 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 102 | #endif // NDNBOOST_NO_IOSTREAM |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 103 | |
| 104 | } // namespace ndnboost |
| 105 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 106 | #endif // NDNBOOST_BLANK_HPP |