File indexing completed on 2025-01-18 09:30:52
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_FLYWEIGHT_DETAIL_PP_PERFECT_FWD_HPP
0010 #define BOOST_FLYWEIGHT_DETAIL_PP_PERFECT_FWD_HPP
0011
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015
0016 #include <boost/config.hpp>
0017
0018 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0019
0020 #define BOOST_FLYWEIGHT_PERFECT_FWD_0(name,body) \
0021 name()body((FORWARD)(0))
0022
0023 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=1
0024 #define BOOST_FLYWEIGHT_PERFECT_FWD_1(name,body) \
0025 template<typename T0> name(T0&& t0)body((FORWARD)(1))
0026 #endif
0027
0028 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=2
0029 #define BOOST_FLYWEIGHT_PERFECT_FWD_2(name,body) \
0030 template<typename T0,typename T1> name(T0&& t0,T1&& t1)body((FORWARD)(2))
0031 #endif
0032
0033 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=3
0034 #define BOOST_FLYWEIGHT_PERFECT_FWD_3(name,body) \
0035 template<typename T0,typename T1,typename T2> name(T0&& t0,T1&& t1,T2&& t2)body((FORWARD)(3))
0036 #endif
0037
0038 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=4
0039 #define BOOST_FLYWEIGHT_PERFECT_FWD_4(name,body) \
0040 template<typename T0,typename T1,typename T2,typename T3> name(T0&& t0,T1&& t1,T2&& t2,T3&& t3)body((FORWARD)(4))
0041 #endif
0042
0043 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=5
0044 #define BOOST_FLYWEIGHT_PERFECT_FWD_5(name,body) \
0045 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0&& t0,T1&& t1,T2&& t2,T3&& t3,T4&& t4)body((FORWARD)(5))
0046 #endif
0047
0048 #else
0049
0050
0051
0052 #define BOOST_FLYWEIGHT_PERFECT_FWD_0(name,body) \
0053 name()body((ENUM)(0))
0054
0055 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=1
0056 #define BOOST_FLYWEIGHT_PERFECT_FWD_1(name,body) \
0057 template<typename T0> name(T0& t0)body((ENUM)(1))\
0058 template<typename T0> name(const T0& t0)body((ENUM)(1))
0059 #endif
0060
0061 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=2
0062 #define BOOST_FLYWEIGHT_PERFECT_FWD_2(name,body) \
0063 template<typename T0,typename T1> name(T0& t0,T1& t1)body((ENUM)(2))\
0064 template<typename T0,typename T1> name(T0& t0,const T1& t1)body((ENUM)(2))\
0065 template<typename T0,typename T1> name(const T0& t0,T1& t1)body((ENUM)(2))\
0066 template<typename T0,typename T1> name(const T0& t0,const T1& t1)body((ENUM)(2))
0067 #endif
0068
0069 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=3
0070 #define BOOST_FLYWEIGHT_PERFECT_FWD_3(name,body) \
0071 template<typename T0,typename T1,typename T2> name(T0& t0,T1& t1,T2& t2)body((ENUM)(3))\
0072 template<typename T0,typename T1,typename T2> name(T0& t0,T1& t1,const T2& t2)body((ENUM)(3))\
0073 template<typename T0,typename T1,typename T2> name(T0& t0,const T1& t1,T2& t2)body((ENUM)(3))\
0074 template<typename T0,typename T1,typename T2> name(T0& t0,const T1& t1,const T2& t2)body((ENUM)(3))\
0075 template<typename T0,typename T1,typename T2> name(const T0& t0,T1& t1,T2& t2)body((ENUM)(3))\
0076 template<typename T0,typename T1,typename T2> name(const T0& t0,T1& t1,const T2& t2)body((ENUM)(3))\
0077 template<typename T0,typename T1,typename T2> name(const T0& t0,const T1& t1,T2& t2)body((ENUM)(3))\
0078 template<typename T0,typename T1,typename T2> name(const T0& t0,const T1& t1,const T2& t2)body((ENUM)(3))
0079 #endif
0080
0081 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=4
0082 #define BOOST_FLYWEIGHT_PERFECT_FWD_4(name,body) \
0083 template<typename T0,typename T1,typename T2,typename T3> name(T0& t0,T1& t1,T2& t2,T3& t3)body((ENUM)(4))\
0084 template<typename T0,typename T1,typename T2,typename T3> name(T0& t0,T1& t1,T2& t2,const T3& t3)body((ENUM)(4))\
0085 template<typename T0,typename T1,typename T2,typename T3> name(T0& t0,T1& t1,const T2& t2,T3& t3)body((ENUM)(4))\
0086 template<typename T0,typename T1,typename T2,typename T3> name(T0& t0,T1& t1,const T2& t2,const T3& t3)body((ENUM)(4))\
0087 template<typename T0,typename T1,typename T2,typename T3> name(T0& t0,const T1& t1,T2& t2,T3& t3)body((ENUM)(4))\
0088 template<typename T0,typename T1,typename T2,typename T3> name(T0& t0,const T1& t1,T2& t2,const T3& t3)body((ENUM)(4))\
0089 template<typename T0,typename T1,typename T2,typename T3> name(T0& t0,const T1& t1,const T2& t2,T3& t3)body((ENUM)(4))\
0090 template<typename T0,typename T1,typename T2,typename T3> name(T0& t0,const T1& t1,const T2& t2,const T3& t3)body((ENUM)(4))\
0091 template<typename T0,typename T1,typename T2,typename T3> name(const T0& t0,T1& t1,T2& t2,T3& t3)body((ENUM)(4))\
0092 template<typename T0,typename T1,typename T2,typename T3> name(const T0& t0,T1& t1,T2& t2,const T3& t3)body((ENUM)(4))\
0093 template<typename T0,typename T1,typename T2,typename T3> name(const T0& t0,T1& t1,const T2& t2,T3& t3)body((ENUM)(4))\
0094 template<typename T0,typename T1,typename T2,typename T3> name(const T0& t0,T1& t1,const T2& t2,const T3& t3)body((ENUM)(4))\
0095 template<typename T0,typename T1,typename T2,typename T3> name(const T0& t0,const T1& t1,T2& t2,T3& t3)body((ENUM)(4))\
0096 template<typename T0,typename T1,typename T2,typename T3> name(const T0& t0,const T1& t1,T2& t2,const T3& t3)body((ENUM)(4))\
0097 template<typename T0,typename T1,typename T2,typename T3> name(const T0& t0,const T1& t1,const T2& t2,T3& t3)body((ENUM)(4))\
0098 template<typename T0,typename T1,typename T2,typename T3> name(const T0& t0,const T1& t1,const T2& t2,const T3& t3)body((ENUM)(4))
0099 #endif
0100
0101 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS>=5
0102 #define BOOST_FLYWEIGHT_PERFECT_FWD_5(name,body) \
0103 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,T1& t1,T2& t2,T3& t3,T4& t4)body((ENUM)(5))\
0104 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,T1& t1,T2& t2,T3& t3,const T4& t4)body((ENUM)(5))\
0105 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,T1& t1,T2& t2,const T3& t3,T4& t4)body((ENUM)(5))\
0106 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,T1& t1,T2& t2,const T3& t3,const T4& t4)body((ENUM)(5))\
0107 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,T1& t1,const T2& t2,T3& t3,T4& t4)body((ENUM)(5))\
0108 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,T1& t1,const T2& t2,T3& t3,const T4& t4)body((ENUM)(5))\
0109 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,T1& t1,const T2& t2,const T3& t3,T4& t4)body((ENUM)(5))\
0110 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,T1& t1,const T2& t2,const T3& t3,const T4& t4)body((ENUM)(5))\
0111 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,const T1& t1,T2& t2,T3& t3,T4& t4)body((ENUM)(5))\
0112 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,const T1& t1,T2& t2,T3& t3,const T4& t4)body((ENUM)(5))\
0113 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,const T1& t1,T2& t2,const T3& t3,T4& t4)body((ENUM)(5))\
0114 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,const T1& t1,T2& t2,const T3& t3,const T4& t4)body((ENUM)(5))\
0115 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,const T1& t1,const T2& t2,T3& t3,T4& t4)body((ENUM)(5))\
0116 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,const T1& t1,const T2& t2,T3& t3,const T4& t4)body((ENUM)(5))\
0117 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,const T1& t1,const T2& t2,const T3& t3,T4& t4)body((ENUM)(5))\
0118 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(T0& t0,const T1& t1,const T2& t2,const T3& t3,const T4& t4)body((ENUM)(5))\
0119 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,T1& t1,T2& t2,T3& t3,T4& t4)body((ENUM)(5))\
0120 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,T1& t1,T2& t2,T3& t3,const T4& t4)body((ENUM)(5))\
0121 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,T1& t1,T2& t2,const T3& t3,T4& t4)body((ENUM)(5))\
0122 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,T1& t1,T2& t2,const T3& t3,const T4& t4)body((ENUM)(5))\
0123 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,T1& t1,const T2& t2,T3& t3,T4& t4)body((ENUM)(5))\
0124 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,T1& t1,const T2& t2,T3& t3,const T4& t4)body((ENUM)(5))\
0125 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,T1& t1,const T2& t2,const T3& t3,T4& t4)body((ENUM)(5))\
0126 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,T1& t1,const T2& t2,const T3& t3,const T4& t4)body((ENUM)(5))\
0127 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,const T1& t1,T2& t2,T3& t3,T4& t4)body((ENUM)(5))\
0128 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,const T1& t1,T2& t2,T3& t3,const T4& t4)body((ENUM)(5))\
0129 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,const T1& t1,T2& t2,const T3& t3,T4& t4)body((ENUM)(5))\
0130 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,const T1& t1,T2& t2,const T3& t3,const T4& t4)body((ENUM)(5))\
0131 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,const T1& t1,const T2& t2,T3& t3,T4& t4)body((ENUM)(5))\
0132 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,const T1& t1,const T2& t2,T3& t3,const T4& t4)body((ENUM)(5))\
0133 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,const T1& t1,const T2& t2,const T3& t3,T4& t4)body((ENUM)(5))\
0134 template<typename T0,typename T1,typename T2,typename T3,typename T4> name(const T0& t0,const T1& t1,const T2& t2,const T3& t3,const T4& t4)body((ENUM)(5))
0135 #endif
0136
0137 #endif
0138
0139 #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS==0
0140 #define BOOST_FLYWEIGHT_PERFECT_FWD_WITH_ARGS(name,body)
0141 #elif BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS==1
0142 #define BOOST_FLYWEIGHT_PERFECT_FWD_WITH_ARGS(name,body) \
0143 BOOST_FLYWEIGHT_PERFECT_FWD_1(name,body)
0144 #elif BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS==2
0145 #define BOOST_FLYWEIGHT_PERFECT_FWD_WITH_ARGS(name,body) \
0146 BOOST_FLYWEIGHT_PERFECT_FWD_1(name,body) \
0147 BOOST_FLYWEIGHT_PERFECT_FWD_2(name,body)
0148 #elif BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS==3
0149 #define BOOST_FLYWEIGHT_PERFECT_FWD_WITH_ARGS(name,body) \
0150 BOOST_FLYWEIGHT_PERFECT_FWD_1(name,body) \
0151 BOOST_FLYWEIGHT_PERFECT_FWD_2(name,body) \
0152 BOOST_FLYWEIGHT_PERFECT_FWD_3(name,body)
0153 #elif BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS==4
0154 #define BOOST_FLYWEIGHT_PERFECT_FWD_WITH_ARGS(name,body) \
0155 BOOST_FLYWEIGHT_PERFECT_FWD_1(name,body) \
0156 BOOST_FLYWEIGHT_PERFECT_FWD_2(name,body) \
0157 BOOST_FLYWEIGHT_PERFECT_FWD_3(name,body) \
0158 BOOST_FLYWEIGHT_PERFECT_FWD_4(name,body)
0159 #else
0160 #define BOOST_FLYWEIGHT_PERFECT_FWD_WITH_ARGS(name,body) \
0161 BOOST_FLYWEIGHT_PERFECT_FWD_1(name,body) \
0162 BOOST_FLYWEIGHT_PERFECT_FWD_2(name,body) \
0163 BOOST_FLYWEIGHT_PERFECT_FWD_3(name,body) \
0164 BOOST_FLYWEIGHT_PERFECT_FWD_4(name,body) \
0165 BOOST_FLYWEIGHT_PERFECT_FWD_5(name,body)
0166 #endif
0167
0168 #define BOOST_FLYWEIGHT_PERFECT_FWD(name,body) \
0169 BOOST_FLYWEIGHT_PERFECT_FWD_0(name,body) \
0170 BOOST_FLYWEIGHT_PERFECT_FWD_WITH_ARGS(name,body)
0171
0172 #endif