You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

377 lines
12 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: stlsoft/internal/cccap/vectorc.h
  3. *
  4. * Purpose: Compiler feature discrimination for CodePlay Vector C.
  5. *
  6. * Created: 3rd October 2003
  7. * Updated: 3rd February 2012
  8. *
  9. * Home: http://stlsoft.org/
  10. *
  11. * Copyright (c) 2003-2012, Matthew Wilson and Synesis Software
  12. * All rights reserved.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions are met:
  16. *
  17. * - Redistributions of source code must retain the above copyright notice, this
  18. * list of conditions and the following disclaimer.
  19. * - Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  23. * any contributors may be used to endorse or promote products derived from
  24. * this software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  30. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  31. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  32. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  33. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  35. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  36. * POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. * ////////////////////////////////////////////////////////////////////// */
  39. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  40. # error This file must not be included independently of stlsoft/stlsoft.h
  41. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  42. /** \file stlsoft/internal/cccap/vectorc.h
  43. *
  44. * Compiler feature discrimination for CodePlay Vector C
  45. * (\ref group__library__internal).
  46. */
  47. #ifdef STLSOFT_INCL_H_STLSOFT_CCCAP_VECTORC
  48. # error This file cannot be included more than once in any compilation unit
  49. #endif /* STLSOFT_INCL_H_STLSOFT_CCCAP_VECTORC */
  50. /* ////////////////////////////////////////////////////////////////////// */
  51. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  52. # define STLSOFT_VER_H_STLSOFT_CCCAP_VECTORC_MAJOR 3
  53. # define STLSOFT_VER_H_STLSOFT_CCCAP_VECTORC_MINOR 18
  54. # define STLSOFT_VER_H_STLSOFT_CCCAP_VECTORC_REVISION 2
  55. # define STLSOFT_VER_H_STLSOFT_CCCAP_VECTORC_EDIT 60
  56. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  57. /* /////////////////////////////////////////////////////////////////////////
  58. * Auto-generation and compatibility
  59. */
  60. /*
  61. [<[STLSOFT-AUTO:NO-DOCFILELABEL]>]
  62. [<[STLSOFT-AUTO:NO-UNITTEST]>]
  63. */
  64. /* /////////////////////////////////////////////////////////////////////////
  65. * Compiler features
  66. */
  67. /* Messaging
  68. */
  69. #ifdef _MSC_VER
  70. # define STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT
  71. #endif /* _MSC_VER */
  72. /* Support for #pragma once
  73. */
  74. /* #define STLSOFT_CF_PRAGMA_ONCE_SUPPORT */
  75. /* Support for __FUNCTION__
  76. */
  77. /* #define STLSOFT_CF_FUNCTION_SYMBOL_SUPPORT */
  78. /* Variadic Macros
  79. */
  80. /* #define STLSOFT_CF_SUPPORTS_VARIADIC_MACROS */
  81. /* Types:
  82. */
  83. /* bool */
  84. #ifdef __cplusplus
  85. # define STLSOFT_CF_NATIVE_BOOL_SUPPORT
  86. #endif /* __cplusplus */
  87. /* char (sign) */
  88. #ifdef _CHAR_UNSIGNED
  89. # define STLSOFT_CF_CHAR_IS_UNSIGNED
  90. #endif /* _CHAR_UNSIGNED */
  91. /* wchar_t */
  92. /* # define STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT */
  93. /* ////////////////////////////////////////////////////////////////////// */
  94. /* ////////////////////////////////////////////////////////////////////// */
  95. /* ////////////////////////////////////////////////////////////////////// */
  96. /* ////////////////////////////////////////////////////////////////////// */
  97. /* ////////////////////////////////////////////////////////////////////// */
  98. /* ////////////////////////////////////////////////////////////////////// */
  99. /* ////////////////////////////////////////////////////////////////////// */
  100. /* ////////////////////////////////////////////////////////////////////// */
  101. /* ////////////////////////////////////////////////////////////////////// */
  102. /* ////////////////////////////////////////////////////////////////////// */
  103. /* /////////////////////////////////////////////////////////////////////////
  104. * Integral types
  105. *
  106. * The purpose of this section is to define the following types:
  107. *
  108. * - 8-bit signed and unsigned integers
  109. * - 16-bit signed and unsigned integers
  110. * - 32-bit signed and unsigned integers
  111. * - (optionally) 64-bit signed and unsigned integers
  112. *
  113. * and to define, where appropriate the following symbols (used for
  114. * overloading):
  115. *
  116. * - STLSOFT_CF_CHAR_DISTINCT_INT_TYPE
  117. * - STLSOFT_CF_SHORT_DISTINCT_INT_TYPE
  118. * - STLSOFT_CF_INT_DISTINCT_INT_TYPE
  119. * - STLSOFT_CF_LONG_DISTINCT_INT_TYPE
  120. * - STLSOFT_CF_LONG_LONG_DISTINCT_INT_TYPE
  121. *
  122. * which indicate that a given type is not used in the size-specific types.
  123. */
  124. #define _STLSOFT_SIZEOF_CHAR (1)
  125. #define _STLSOFT_SIZEOF_SHORT (2)
  126. #define _STLSOFT_SIZEOF_INT (4)
  127. #define _STLSOFT_SIZEOF_LONG (4)
  128. #define _STLSOFT_SIZEOF_LONG_LONG (8)
  129. /* 8-bit integer */
  130. #define STLSOFT_CF_8BIT_INT_SUPPORT
  131. #define STLSOFT_SI08_T_BASE_TYPE signed char
  132. #define STLSOFT_UI08_T_BASE_TYPE unsigned char
  133. /* 16-bit integer */
  134. #define STLSOFT_CF_16BIT_INT_SUPPORT
  135. #define STLSOFT_SI16_T_BASE_TYPE signed short
  136. #define STLSOFT_UI16_T_BASE_TYPE unsigned short
  137. /* 32-bit integer */
  138. #define STLSOFT_CF_32BIT_INT_SUPPORT
  139. #define STLSOFT_SI32_T_BASE_TYPE signed int
  140. #define STLSOFT_UI32_T_BASE_TYPE unsigned int
  141. #define STLSOFT_CF_LONG_DISTINCT_INT_TYPE
  142. #define STLSOFT_CF_64BIT_INT_SUPPORT
  143. #define STLSOFT_CF_64BIT_INT_IS_long_long
  144. #define STLSOFT_SI64_T_BASE_TYPE signed long long
  145. #define STLSOFT_UI64_T_BASE_TYPE unsigned long long
  146. /* Member constants */
  147. #define STLSOFT_CF_MEMBER_CONSTANT_SUPPORT
  148. /* Static assertions */
  149. #define STLSOFT_CF_STATIC_ASSERT_SUPPORT
  150. /* RTTI support */
  151. #ifdef __CPPRTTI
  152. # define STLSOFT_CF_RTTI_SUPPORT
  153. #else /* ? __CPPRTTI */
  154. /* Not defined */
  155. #endif /* __CPPRTTI */
  156. /* Exception support */
  157. # ifdef __CPPUNWIND
  158. # define STLSOFT_CF_EXCEPTION_SUPPORT
  159. # else
  160. /* Not defined */
  161. # endif /* __CPPUNWIND */
  162. /* */
  163. #define STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
  164. /* Namespace support */
  165. /* #define _STLSOFT_NO_NAMESPACES */
  166. #ifdef __cplusplus
  167. # define STLSOFT_CF_NAMESPACE_SUPPORT
  168. #endif /* __cplusplus */
  169. #define STLSOFT_CF_ANONYMOUS_UNION_SUPPORT
  170. /* #define STLSOFT_CF_COMPILER_SUPPORTS_RETURN_VOID */
  171. /* Template support */
  172. #define STLSOFT_CF_TEMPLATE_SUPPORT
  173. /* #define STLSOFT_CF_TEMPLATE_TYPE_REQUIRED_IN_ARGS */
  174. # ifdef __CPPUNWIND
  175. # define STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
  176. # else
  177. /* Not defined */
  178. # endif /* __CPPUNWIND */
  179. /* #define STLSOFT_CF_EXCEPTION_SPEC_EXPENSIVE */
  180. /* #define STLSOFT_CF_THROW_BAD_ALLOC */
  181. #define STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT
  182. #define STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
  183. #define STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT
  184. #define STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
  185. #define STLSOFT_CF_MEMBER_TEMPLATE_OVERLOAD_DISCRIMINATED
  186. #define STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
  187. #define STLSOFT_CF_MEMBER_TEMPLATE_CTOR_OVERLOAD_DISCRIMINATED
  188. #define STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
  189. #define STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT
  190. #define STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
  191. /* #define STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */
  192. # ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
  193. # undef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
  194. # endif /* STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT */
  195. #define STLSOFT_CF_std_NAMESPACE
  196. #define STLSOFT_CF_std_char_traits_AVAILABLE
  197. /* #define STLSOFT_CF_PARENT_TYPES_CAN_BE_USED_IN_NON_TEMPLATE */
  198. /* #define STLSOFT_CF_PARENT_TYPES_CAN_BE_USED_IN_TEMPLATE */
  199. #define STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
  200. #define STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
  201. #define STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
  202. #define STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
  203. /* #define STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT */
  204. /* #define STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT */
  205. /* #define STLSOFT_CF_TYPENAME_TYPE_RET_KEYWORD_SUPPORT */
  206. /* #define STLSOFT_CF_TEMPLATE_QUALIFIER_KEYWORD_SUPPORT */
  207. /* #define STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT */
  208. /* #define STLSOFT_CF_ADL_LOOKUP_SUPPORT */
  209. /* #define STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT */
  210. /* Unfortunately, VectorC cannot work with arrays of const char, and when an overload of
  211. * ss_static_array_size() is provided it goes into an infinte loop.
  212. */
  213. /* #define STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT */
  214. #define STLSOFT_CF_VENEER_SUPPORT
  215. #define STLSOFT_CF_ALLOCATOR_BASE_EXPENSIVE
  216. /* #define STLSOFT_CF_COMPILER_WARNS_NO_PUBLIC_DTOR */
  217. #define STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED
  218. #define STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT
  219. /* #define STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
  220. /* #define STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
  221. /* /////////////////////////////////////////////////////////////////////////
  222. * Quality assurance features
  223. */
  224. #if defined(_STLSOFT_CUSTOM_ASSERT)
  225. /* You have defined the preprocessor symbol _STLSOFT_CUSTOM_ASSERT,
  226. * which stipulates that you will be providing your own assert. This
  227. * requires that you have defined _STLSOFT_CUSTOM_ASSERT() as a macro
  228. * taking 1 parameter (the condition to assert).
  229. *
  230. * Suppose you have a function DisplayAssert_(), which has the
  231. * following signature:
  232. *
  233. * void DisplayAssert_(char const* file, int line, char const* expression);
  234. *
  235. * Presumably you would also have your own assert macro, say MY_ASSERT(),
  236. * defined as:
  237. *
  238. * #define MY_ASSERT(_x) ((void)((!(_x)) ? ((void)(DisplayAssert_(__FILE__, __LINE__, #_x))) : ((void)0)))
  239. *
  240. * so you would simply need to define _STLSOFT_CUSTOM_ASSERT() in terms of
  241. * MY_ASSERT(), as in:
  242. *
  243. * #define _STLSOFT_CUSTOM_ASSERT(_x) MY_ASSERT(_x)
  244. *
  245. * You must also specify the include header name containing your
  246. * custom assertion declaration, in the preprocessor symbol
  247. * _STLSOFT_CUSTOM_ASSERT_INCLUDE
  248. */
  249. # define __STLSOFT_CF_ASSERT_SUPPORT
  250. # define STLSOFT_CF_ASSERT_SUPPORT
  251. # define STLSOFT_ASSERT(_x) _STLSOFT_CUSTOM_ASSERT(_x)
  252. # if defined(_STLSOFT_CUSTOM_ASSERT_INCLUDE)
  253. # define __STLSOFT_CF_ASSERT_INCLUDE_NAME _STLSOFT_CUSTOM_ASSERT_INCLUDE
  254. # else
  255. # error You must define _STLSOFT_CUSTOM_ASSERT_INCLUDE along with _STLSOFT_CUSTOM_ASSERT()
  256. # endif /* !_STLSOFT_CUSTOM_ASSERT_INCLUDE */
  257. #else /* ? _STLSOFT_CUSTOM_ASSERT */
  258. # ifndef _DEBUG
  259. /* # define NDEBUG */
  260. # endif /* _DEBUG */ */
  261. # define __STLSOFT_CF_ASSERT_SUPPORT
  262. # define STLSOFT_CF_ASSERT_SUPPORT
  263. # define __STLSOFT_CF_ASSERT_INCLUDE_NAME <assert.h>
  264. # define STLSOFT_ASSERT(_x) assert(_x)
  265. #endif /* _STLSOFT_CUSTOM_ASSERT */
  266. /* /////////////////////////////////////////////////////////////////////////
  267. * Calling convention
  268. */
  269. #define STLSOFT_CF_THISCALL_SUPPORTED
  270. #define STLSOFT_CF_CDECL_SUPPORTED
  271. #define STLSOFT_CF_FASTCALL_SUPPORTED
  272. #define STLSOFT_CF_STDCALL_SUPPORTED
  273. #ifdef STLSOFT_CF_CDECL_SUPPORTED
  274. # define STLSOFT_CDECL __cdecl
  275. #endif /* STLSOFT_CF_CDECL_SUPPORTED */
  276. #ifdef STLSOFT_CF_FASTCALL_SUPPORTED
  277. # define STLSOFT_FASTCALL __fastcall
  278. #endif /* STLSOFT_CF_FASTCALL_SUPPORTED */
  279. #ifdef STLSOFT_CF_STDCALL_SUPPORTED
  280. # define STLSOFT_STDCALL __stdcall
  281. #endif /* STLSOFT_CF_STDCALL_SUPPORTED */
  282. /* /////////////////////////////////////////////////////////////////////////
  283. * Inline assembler
  284. */
  285. #define STSLSOFT_INLINE_ASM_SUPPORTED
  286. #define STSLSOFT_ASM_IN_INLINE_SUPPORTED
  287. /* /////////////////////////////////////////////////////////////////////////
  288. * Compiler warning suppression
  289. */
  290. /* ///////////////////////////// end of file //////////////////////////// */