annotate DEPENDENCIES/generic/include/boost/flyweight/flyweight_fwd.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents c530137014c0
children
rev   line source
Chris@101 1 /* Copyright 2006-2014 Joaquin M Lopez Munoz.
Chris@16 2 * Distributed under the Boost Software License, Version 1.0.
Chris@16 3 * (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 4 * http://www.boost.org/LICENSE_1_0.txt)
Chris@16 5 *
Chris@16 6 * See http://www.boost.org/libs/flyweight for library home page.
Chris@16 7 */
Chris@16 8
Chris@16 9 #ifndef BOOST_FLYWEIGHT_FLYWEIGHT_FWD_HPP
Chris@16 10 #define BOOST_FLYWEIGHT_FLYWEIGHT_FWD_HPP
Chris@16 11
Chris@101 12 #if defined(_MSC_VER)
Chris@16 13 #pragma once
Chris@16 14 #endif
Chris@16 15
Chris@16 16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
Chris@16 17 #include <boost/detail/templated_streams.hpp>
Chris@16 18 #include <boost/parameter/parameters.hpp>
Chris@16 19 #include <boost/preprocessor/punctuation/comma.hpp>
Chris@16 20 #include <iosfwd>
Chris@16 21
Chris@101 22 #if !defined(BOOST_FLYWEIGHT_DISABLE_HASH_SUPPORT)
Chris@101 23 #include <boost/functional/hash_fwd.hpp>
Chris@101 24 #include <cstddef>
Chris@101 25 #endif
Chris@101 26
Chris@16 27 namespace boost{
Chris@16 28
Chris@16 29 namespace flyweights{
Chris@16 30
Chris@16 31 template<
Chris@16 32 typename T,
Chris@16 33 typename Arg1=parameter::void_,
Chris@16 34 typename Arg2=parameter::void_,
Chris@16 35 typename Arg3=parameter::void_,
Chris@16 36 typename Arg4=parameter::void_,
Chris@16 37 typename Arg5=parameter::void_
Chris@16 38 >
Chris@16 39 class flyweight;
Chris@16 40
Chris@16 41 #define BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(n) \
Chris@16 42 typename Arg##n##1,typename Arg##n##2,typename Arg##n##3, \
Chris@16 43 typename Arg##n##4,typename Arg##n##5
Chris@16 44 #define BOOST_FLYWEIGHT_TEMPL_ARGS(n) \
Chris@16 45 Arg##n##1,Arg##n##2,Arg##n##3,Arg##n##4,Arg##n##5
Chris@16 46
Chris@16 47 template<
Chris@16 48 typename T1,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(1),
Chris@16 49 typename T2,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(2)
Chris@16 50 >
Chris@16 51 bool operator==(
Chris@16 52 const flyweight<T1,BOOST_FLYWEIGHT_TEMPL_ARGS(1)>& x,
Chris@16 53 const flyweight<T2,BOOST_FLYWEIGHT_TEMPL_ARGS(2)>& y);
Chris@16 54
Chris@16 55 template<
Chris@16 56 typename T1,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(1),
Chris@16 57 typename T2,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(2)
Chris@16 58 >
Chris@16 59 bool operator<(
Chris@16 60 const flyweight<T1,BOOST_FLYWEIGHT_TEMPL_ARGS(1)>& x,
Chris@16 61 const flyweight<T2,BOOST_FLYWEIGHT_TEMPL_ARGS(2)>& y);
Chris@16 62
Chris@16 63 #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
Chris@16 64 template<
Chris@16 65 typename T1,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(1),
Chris@16 66 typename T2
Chris@16 67 >
Chris@16 68 bool operator==(
Chris@16 69 const flyweight<T1,BOOST_FLYWEIGHT_TEMPL_ARGS(1)>& x,const T2& y);
Chris@16 70
Chris@16 71 template<
Chris@16 72 typename T1,
Chris@16 73 typename T2,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(2)
Chris@16 74 >
Chris@16 75 bool operator==(
Chris@16 76 const T1& x,const flyweight<T2,BOOST_FLYWEIGHT_TEMPL_ARGS(2)>& y);
Chris@16 77
Chris@16 78 template<
Chris@16 79 typename T1,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(1),
Chris@16 80 typename T2
Chris@16 81 >
Chris@16 82 bool operator<(
Chris@16 83 const flyweight<T1,BOOST_FLYWEIGHT_TEMPL_ARGS(1)>& x,const T2& y);
Chris@16 84
Chris@16 85 template<
Chris@16 86 typename T1,
Chris@16 87 typename T2,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(2)
Chris@16 88 >
Chris@16 89 bool operator<(
Chris@16 90 const T1& x,const flyweight<T2,BOOST_FLYWEIGHT_TEMPL_ARGS(2)>& y);
Chris@16 91 #endif /* !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) */
Chris@16 92
Chris@16 93 #define BOOST_FLYWEIGHT_COMPLETE_COMP_OPS_DECL(t,a1,a2) \
Chris@16 94 template<t> \
Chris@16 95 inline bool operator!=(const a1& x,const a2& y); \
Chris@16 96 \
Chris@16 97 template<t> \
Chris@16 98 inline bool operator>(const a1& x,const a2& y); \
Chris@16 99 \
Chris@16 100 template<t> \
Chris@16 101 inline bool operator>=(const a1& x,const a2& y); \
Chris@16 102 \
Chris@16 103 template<t> \
Chris@16 104 inline bool operator<=(const a1& x,const a2& y); \
Chris@16 105
Chris@16 106 BOOST_FLYWEIGHT_COMPLETE_COMP_OPS_DECL(
Chris@16 107 typename T1 BOOST_PP_COMMA()
Chris@16 108 BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(1) BOOST_PP_COMMA()
Chris@16 109 typename T2 BOOST_PP_COMMA()
Chris@16 110 BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(2),
Chris@16 111 flyweight<
Chris@16 112 T1 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TEMPL_ARGS(1)
Chris@16 113 >,
Chris@16 114 flyweight<
Chris@16 115 T2 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TEMPL_ARGS(2)
Chris@16 116 >)
Chris@16 117
Chris@16 118 #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
Chris@16 119 BOOST_FLYWEIGHT_COMPLETE_COMP_OPS_DECL(
Chris@16 120 typename T1 BOOST_PP_COMMA()
Chris@16 121 BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(1) BOOST_PP_COMMA()
Chris@16 122 typename T2,
Chris@16 123 flyweight<
Chris@16 124 T1 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TEMPL_ARGS(1)
Chris@16 125 >,
Chris@16 126 T2)
Chris@16 127
Chris@16 128 BOOST_FLYWEIGHT_COMPLETE_COMP_OPS_DECL(
Chris@16 129 typename T1 BOOST_PP_COMMA()
Chris@16 130 typename T2 BOOST_PP_COMMA()
Chris@16 131 BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(2),
Chris@16 132 T1,
Chris@16 133 flyweight<
Chris@16 134 T2 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TEMPL_ARGS(2)
Chris@16 135 >)
Chris@16 136 #endif /* !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) */
Chris@16 137
Chris@16 138 template<typename T,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(_)>
Chris@16 139 inline void swap(
Chris@16 140 flyweight<T,BOOST_FLYWEIGHT_TEMPL_ARGS(_)>& x,
Chris@16 141 flyweight<T,BOOST_FLYWEIGHT_TEMPL_ARGS(_)>& y);
Chris@16 142
Chris@16 143 template<
Chris@16 144 BOOST_TEMPLATED_STREAM_ARGS(ElemType,Traits)
Chris@16 145 BOOST_TEMPLATED_STREAM_COMMA
Chris@16 146 typename T,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(_)
Chris@16 147 >
Chris@16 148 inline BOOST_TEMPLATED_STREAM(ostream,ElemType,Traits)& operator<<(
Chris@16 149 BOOST_TEMPLATED_STREAM(ostream,ElemType,Traits)& out,
Chris@16 150 const flyweight<T,BOOST_FLYWEIGHT_TEMPL_ARGS(_)>& x);
Chris@16 151
Chris@16 152 template<
Chris@16 153 BOOST_TEMPLATED_STREAM_ARGS(ElemType,Traits)
Chris@16 154 BOOST_TEMPLATED_STREAM_COMMA
Chris@16 155 typename T,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(_)
Chris@16 156 >
Chris@16 157 inline BOOST_TEMPLATED_STREAM(istream,ElemType,Traits)& operator>>(
Chris@16 158 BOOST_TEMPLATED_STREAM(istream,ElemType,Traits)& in,
Chris@16 159 flyweight<T,BOOST_FLYWEIGHT_TEMPL_ARGS(_)>& x);
Chris@16 160
Chris@16 161 } /* namespace flyweights */
Chris@16 162
Chris@16 163 using flyweights::flyweight;
Chris@16 164
Chris@16 165 } /* namespace boost */
Chris@16 166
Chris@101 167 #if !defined(BOOST_FLYWEIGHT_DISABLE_HASH_SUPPORT)
Chris@101 168 #if !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
Chris@101 169
Chris@101 170 #if !defined(_LIBCPP_VERSION)
Chris@101 171 namespace std{
Chris@101 172 template <class T> struct hash;
Chris@101 173 }
Chris@101 174 #else
Chris@101 175 /* As discussed in http://lists.boost.org/Archives/boost/2011/02/177218.php */
Chris@101 176 #include <functional>
Chris@101 177 #endif
Chris@101 178
Chris@101 179 namespace std{
Chris@101 180
Chris@101 181 template<typename T,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(_)>
Chris@101 182 struct hash<boost::flyweight<T,BOOST_FLYWEIGHT_TEMPL_ARGS(_)> >;
Chris@101 183
Chris@101 184 } /* namespace std */
Chris@101 185 #endif /* !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) */
Chris@101 186
Chris@101 187 namespace boost{
Chris@101 188 #if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
Chris@101 189 namespace flyweights{
Chris@101 190 #endif
Chris@101 191
Chris@101 192 template<typename T,BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(_)>
Chris@101 193 inline std::size_t hash_value(
Chris@101 194 const flyweight<T,BOOST_FLYWEIGHT_TEMPL_ARGS(_)>& x);
Chris@101 195
Chris@101 196 #if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
Chris@101 197 } /* namespace flyweights */
Chris@101 198 #endif
Chris@101 199 } /* namespace boost */
Chris@101 200 #endif /* !defined(BOOST_FLYWEIGHT_DISABLE_HASH_SUPPORT) */
Chris@101 201
Chris@16 202 #undef BOOST_FLYWEIGHT_COMPLETE_COMP_OPS_DECL
Chris@16 203 #undef BOOST_FLYWEIGHT_TEMPL_ARGS
Chris@16 204 #undef BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS
Chris@16 205
Chris@16 206 #endif