is_function_cxx_11.hpp 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. // Copyright 2000 John Maddock (john@johnmaddock.co.uk)
  2. // Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
  3. //
  4. // Use, modification and distribution are subject to the Boost Software License,
  5. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt).
  7. //
  8. // See http://www.boost.org/libs/type_traits for most recent version including documentation.
  9. #ifndef BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED
  10. #define BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED
  11. #include <boost/type_traits/integral_constant.hpp>
  12. namespace boost {
  13. template <class T>
  14. struct is_function : public false_type {};
  15. #if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM)
  16. #define BOOST_TT_NOEXCEPT_PARAM , bool NE
  17. #define BOOST_TT_NOEXCEPT_DECL noexcept(NE)
  18. #else
  19. #define BOOST_TT_NOEXCEPT_PARAM
  20. #define BOOST_TT_NOEXCEPT_DECL
  21. #endif
  22. #ifdef _MSC_VER
  23. #define BOOST_TT_DEF_CALL __cdecl
  24. #else
  25. #define BOOST_TT_DEF_CALL
  26. #endif
  27. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  28. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  29. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  30. struct is_function<Ret(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  31. // const qualified:
  32. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  33. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  34. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  35. struct is_function<Ret(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  36. // volatile:
  37. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  38. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  39. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  40. struct is_function<Ret(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  41. // const volatile
  42. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  43. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  44. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  45. struct is_function<Ret(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  46. // Reference qualified:
  47. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  48. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  49. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  50. struct is_function<Ret(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  51. // const qualified:
  52. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  53. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  54. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  55. struct is_function<Ret(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  56. // volatile:
  57. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  58. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  59. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  60. struct is_function<Ret(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  61. // const volatile
  62. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  63. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  64. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  65. struct is_function<Ret(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  66. // rvalue reference qualified:
  67. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  68. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)&& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  69. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  70. struct is_function<Ret(Args..., ...)&& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  71. // const qualified:
  72. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  73. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  74. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  75. struct is_function<Ret(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  76. // volatile:
  77. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  78. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  79. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  80. struct is_function<Ret(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  81. // const volatile
  82. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  83. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  84. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  85. struct is_function<Ret(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  86. #if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64)
  87. #ifdef __CLR_VER
  88. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  89. struct is_function<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  90. #endif
  91. #ifndef _M_AMD64
  92. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  93. struct is_function<Ret __stdcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  94. #ifndef __CLR_VER
  95. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  96. struct is_function<Ret __fastcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  97. #endif
  98. #endif
  99. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  100. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  101. struct is_function<Ret __vectorcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  102. #endif
  103. // const:
  104. #ifdef __CLR_VER
  105. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  106. struct is_function<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  107. #endif
  108. #ifndef _M_AMD64
  109. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  110. struct is_function<Ret __stdcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  111. #ifndef __CLR_VER
  112. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  113. struct is_function<Ret __fastcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  114. #endif
  115. #endif
  116. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  117. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  118. struct is_function<Ret __vectorcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  119. #endif
  120. // volatile:
  121. #ifdef __CLR_VER
  122. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  123. struct is_function<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  124. #endif
  125. #ifndef _M_AMD64
  126. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  127. struct is_function<Ret __stdcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  128. #ifndef __CLR_VER
  129. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  130. struct is_function<Ret __fastcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  131. #endif
  132. #endif
  133. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  134. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  135. struct is_function<Ret __vectorcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  136. #endif
  137. // const volatile:
  138. #ifdef __CLR_VER
  139. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  140. struct is_function<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  141. #endif
  142. #ifndef _M_AMD64
  143. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  144. struct is_function<Ret __stdcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  145. #ifndef __CLR_VER
  146. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  147. struct is_function<Ret __fastcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  148. #endif
  149. #endif
  150. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  151. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  152. struct is_function<Ret __vectorcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  153. #endif
  154. // reference qualified:
  155. #ifdef __CLR_VER
  156. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  157. struct is_function<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  158. #endif
  159. #ifndef _M_AMD64
  160. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  161. struct is_function<Ret __stdcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  162. #ifndef __CLR_VER
  163. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  164. struct is_function<Ret __fastcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  165. #endif
  166. #endif
  167. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  168. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  169. struct is_function<Ret __vectorcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  170. #endif
  171. // const:
  172. #ifdef __CLR_VER
  173. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  174. struct is_function<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  175. #endif
  176. #ifndef _M_AMD64
  177. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  178. struct is_function<Ret __stdcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  179. #ifndef __CLR_VER
  180. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  181. struct is_function<Ret __fastcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  182. #endif
  183. #endif
  184. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  185. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  186. struct is_function<Ret __vectorcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  187. #endif
  188. // volatile:
  189. #ifdef __CLR_VER
  190. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  191. struct is_function<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  192. #endif
  193. #ifndef _M_AMD64
  194. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  195. struct is_function<Ret __stdcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  196. #ifndef __CLR_VER
  197. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  198. struct is_function<Ret __fastcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  199. #endif
  200. #endif
  201. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  202. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  203. struct is_function<Ret __vectorcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  204. #endif
  205. // const volatile:
  206. #ifdef __CLR_VER
  207. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  208. struct is_function<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  209. #endif
  210. #ifndef _M_AMD64
  211. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  212. struct is_function<Ret __stdcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  213. #ifndef __CLR_VER
  214. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  215. struct is_function<Ret __fastcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  216. #endif
  217. #endif
  218. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  219. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  220. struct is_function<Ret __vectorcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  221. #endif
  222. // rvalue reference qualified:
  223. #ifdef __CLR_VER
  224. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  225. struct is_function<Ret __clrcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  226. #endif
  227. #ifndef _M_AMD64
  228. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  229. struct is_function<Ret __stdcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  230. #ifndef __CLR_VER
  231. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  232. struct is_function<Ret __fastcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  233. #endif
  234. #endif
  235. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  236. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  237. struct is_function<Ret __vectorcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  238. #endif
  239. // const:
  240. #ifdef __CLR_VER
  241. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  242. struct is_function<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  243. #endif
  244. #ifndef _M_AMD64
  245. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  246. struct is_function<Ret __stdcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  247. #ifndef __CLR_VER
  248. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  249. struct is_function<Ret __fastcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  250. #endif
  251. #endif
  252. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  253. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  254. struct is_function<Ret __vectorcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  255. #endif
  256. // volatile:
  257. #ifdef __CLR_VER
  258. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  259. struct is_function<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  260. #endif
  261. #ifndef _M_AMD64
  262. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  263. struct is_function<Ret __stdcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  264. #ifndef __CLR_VER
  265. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  266. struct is_function<Ret __fastcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  267. #endif
  268. #endif
  269. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  270. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  271. struct is_function<Ret __vectorcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  272. #endif
  273. // const volatile:
  274. #ifdef __CLR_VER
  275. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  276. struct is_function<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  277. #endif
  278. #ifndef _M_AMD64
  279. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  280. struct is_function<Ret __stdcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  281. #ifndef __CLR_VER
  282. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  283. struct is_function<Ret __fastcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  284. #endif
  285. #endif
  286. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  287. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  288. struct is_function<Ret __vectorcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  289. #endif
  290. #endif // _MSC_VER
  291. // All over again for msvc with noexcept:
  292. #if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE)
  293. #undef BOOST_TT_NOEXCEPT_DECL
  294. #define BOOST_TT_NOEXCEPT_DECL noexcept
  295. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  296. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  297. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  298. struct is_function<Ret(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  299. // const qualified:
  300. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  301. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  302. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  303. struct is_function<Ret(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  304. // volatile:
  305. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  306. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  307. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  308. struct is_function<Ret(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  309. // const volatile
  310. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  311. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  312. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  313. struct is_function<Ret(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  314. // Reference qualified:
  315. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  316. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  317. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  318. struct is_function<Ret(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  319. // const qualified:
  320. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  321. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  322. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  323. struct is_function<Ret(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  324. // volatile:
  325. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  326. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  327. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  328. struct is_function<Ret(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  329. // const volatile
  330. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  331. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  332. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  333. struct is_function<Ret(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  334. // rvalue reference qualified:
  335. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  336. struct is_function<Ret BOOST_TT_DEF_CALL(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  337. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  338. struct is_function<Ret(Args..., ...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  339. // const qualified:
  340. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  341. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  342. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  343. struct is_function<Ret(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  344. // volatile:
  345. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  346. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  347. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  348. struct is_function<Ret(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  349. // const volatile
  350. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  351. struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  352. template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
  353. struct is_function<Ret(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  354. #if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64)
  355. #ifdef __CLR_VER
  356. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  357. struct is_function<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  358. #endif
  359. #ifndef _M_AMD64
  360. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  361. struct is_function<Ret __stdcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  362. #ifndef __CLR_VER
  363. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  364. struct is_function<Ret __fastcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  365. #endif
  366. #endif
  367. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  368. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  369. struct is_function<Ret __vectorcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  370. #endif
  371. // const:
  372. #ifdef __CLR_VER
  373. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  374. struct is_function<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  375. #endif
  376. #ifndef _M_AMD64
  377. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  378. struct is_function<Ret __stdcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  379. #ifndef __CLR_VER
  380. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  381. struct is_function<Ret __fastcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  382. #endif
  383. #endif
  384. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  385. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  386. struct is_function<Ret __vectorcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  387. #endif
  388. // volatile:
  389. #ifdef __CLR_VER
  390. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  391. struct is_function<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  392. #endif
  393. #ifndef _M_AMD64
  394. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  395. struct is_function<Ret __stdcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  396. #ifndef __CLR_VER
  397. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  398. struct is_function<Ret __fastcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  399. #endif
  400. #endif
  401. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  402. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  403. struct is_function<Ret __vectorcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  404. #endif
  405. // const volatile:
  406. #ifdef __CLR_VER
  407. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  408. struct is_function<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  409. #endif
  410. #ifndef _M_AMD64
  411. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  412. struct is_function<Ret __stdcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  413. #ifndef __CLR_VER
  414. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  415. struct is_function<Ret __fastcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  416. #endif
  417. #endif
  418. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  419. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  420. struct is_function<Ret __vectorcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  421. #endif
  422. // reference qualified:
  423. #ifdef __CLR_VER
  424. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  425. struct is_function<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  426. #endif
  427. #ifndef _M_AMD64
  428. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  429. struct is_function<Ret __stdcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  430. #ifndef __CLR_VER
  431. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  432. struct is_function<Ret __fastcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  433. #endif
  434. #endif
  435. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  436. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  437. struct is_function<Ret __vectorcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  438. #endif
  439. // const:
  440. #ifdef __CLR_VER
  441. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  442. struct is_function<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  443. #endif
  444. #ifndef _M_AMD64
  445. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  446. struct is_function<Ret __stdcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  447. #ifndef __CLR_VER
  448. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  449. struct is_function<Ret __fastcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  450. #endif
  451. #endif
  452. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  453. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  454. struct is_function<Ret __vectorcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  455. #endif
  456. // volatile:
  457. #ifdef __CLR_VER
  458. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  459. struct is_function<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  460. #endif
  461. #ifndef _M_AMD64
  462. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  463. struct is_function<Ret __stdcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  464. #ifndef __CLR_VER
  465. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  466. struct is_function<Ret __fastcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  467. #endif
  468. #endif
  469. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  470. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  471. struct is_function<Ret __vectorcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  472. #endif
  473. // const volatile:
  474. #ifdef __CLR_VER
  475. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  476. struct is_function<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  477. #endif
  478. #ifndef _M_AMD64
  479. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  480. struct is_function<Ret __stdcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  481. #ifndef __CLR_VER
  482. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  483. struct is_function<Ret __fastcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  484. #endif
  485. #endif
  486. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  487. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  488. struct is_function<Ret __vectorcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  489. #endif
  490. // rvalue reference qualified:
  491. #ifdef __CLR_VER
  492. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  493. struct is_function<Ret __clrcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  494. #endif
  495. #ifndef _M_AMD64
  496. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  497. struct is_function<Ret __stdcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  498. #ifndef __CLR_VER
  499. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  500. struct is_function<Ret __fastcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  501. #endif
  502. #endif
  503. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  504. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  505. struct is_function<Ret __vectorcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  506. #endif
  507. // const:
  508. #ifdef __CLR_VER
  509. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  510. struct is_function<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  511. #endif
  512. #ifndef _M_AMD64
  513. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  514. struct is_function<Ret __stdcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  515. #ifndef __CLR_VER
  516. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  517. struct is_function<Ret __fastcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  518. #endif
  519. #endif
  520. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  521. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  522. struct is_function<Ret __vectorcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  523. #endif
  524. // volatile:
  525. #ifdef __CLR_VER
  526. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  527. struct is_function<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  528. #endif
  529. #ifndef _M_AMD64
  530. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  531. struct is_function<Ret __stdcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  532. #ifndef __CLR_VER
  533. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  534. struct is_function<Ret __fastcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  535. #endif
  536. #endif
  537. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  538. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  539. struct is_function<Ret __vectorcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  540. #endif
  541. // const volatile:
  542. #ifdef __CLR_VER
  543. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  544. struct is_function<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  545. #endif
  546. #ifndef _M_AMD64
  547. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  548. struct is_function<Ret __stdcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  549. #ifndef __CLR_VER
  550. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  551. struct is_function<Ret __fastcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  552. #endif
  553. #endif
  554. #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
  555. template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
  556. struct is_function<Ret __vectorcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
  557. #endif
  558. #endif // defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64)
  559. #endif
  560. }
  561. #undef BOOST_TT_NOEXCEPT_DECL
  562. #undef BOOST_TT_NOEXCEPT_PARAM
  563. #undef BOOST_TT_DEF_CALL
  564. #endif // BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED