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.

665 lines
20 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: stlsoft/internal/cccap/intel.h
  3. *
  4. * Purpose: Compiler feature discrimination for Intel C/C++.
  5. *
  6. * Created: 7th February 2003
  7. * Updated: 3rd February 2012
  8. *
  9. * Thanks: To Derek Baikie for working on the
  10. * Win64-compatibility.
  11. *
  12. * Home: http://stlsoft.org/
  13. *
  14. * Copyright (c) 2003-2012, Matthew Wilson and Synesis Software
  15. * All rights reserved.
  16. *
  17. * Redistribution and use in source and binary forms, with or without
  18. * modification, are permitted provided that the following conditions are met:
  19. *
  20. * - Redistributions of source code must retain the above copyright notice, this
  21. * list of conditions and the following disclaimer.
  22. * - Redistributions in binary form must reproduce the above copyright notice,
  23. * this list of conditions and the following disclaimer in the documentation
  24. * and/or other materials provided with the distribution.
  25. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  26. * any contributors may be used to endorse or promote products derived from
  27. * this software without specific prior written permission.
  28. *
  29. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  30. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  31. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  32. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  33. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  34. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  35. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  36. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  37. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  38. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  39. * POSSIBILITY OF SUCH DAMAGE.
  40. *
  41. * ////////////////////////////////////////////////////////////////////// */
  42. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  43. # error This file must not be included independently of stlsoft/stlsoft.h
  44. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  45. /** \file stlsoft/internal/cccap/intel.h
  46. *
  47. * Compiler feature discrimination for Intel C/C++
  48. * (\ref group__library__internal).
  49. */
  50. #ifdef STLSOFT_INCL_H_STLSOFT_CCCAP_INTEL
  51. # error This file cannot be included more than once in any compilation unit
  52. #endif /* STLSOFT_INCL_H_STLSOFT_CCCAP_INTEL */
  53. #ifndef STLSOFT_COMPILER_IS_INTEL
  54. # error This file has been erroneously included for a compiler other than Intel C/C++
  55. #endif /* compiler */
  56. /* ////////////////////////////////////////////////////////////////////// */
  57. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  58. # define STLSOFT_VER_H_STLSOFT_CCCAP_INTEL_MAJOR 3
  59. # define STLSOFT_VER_H_STLSOFT_CCCAP_INTEL_MINOR 18
  60. # define STLSOFT_VER_H_STLSOFT_CCCAP_INTEL_REVISION 2
  61. # define STLSOFT_VER_H_STLSOFT_CCCAP_INTEL_EDIT 79
  62. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  63. /* /////////////////////////////////////////////////////////////////////////
  64. * Structure:
  65. *
  66. * - auto-generation and compatibility
  67. * - preprocessor features
  68. * - support for built-in types
  69. * - built-in type characteristics
  70. * - support for C/C++ language features
  71. * - support for C language features
  72. * - support for C++ language features - 1
  73. * - support for C++ language features - 2
  74. * - inline assembler
  75. * - calling convention
  76. * - integer sizes
  77. * - size-specific integer types
  78. * - still to-be-determined features
  79. * - assertions
  80. * - compiler warning suppression
  81. * - obsolete features
  82. */
  83. /* /////////////////////////////////////////////////////////////////////////
  84. * Auto-generation and compatibility
  85. */
  86. /*
  87. [<[STLSOFT-AUTO:NO-DOCFILELABEL]>]
  88. [<[STLSOFT-AUTO:NO-UNITTEST]>]
  89. */
  90. /* /////////////////////////////////////////////////////////////////////////
  91. * Compiler features / compatibility
  92. */
  93. #if defined(_MSC_VER) && \
  94. _MSC_VER < 1200
  95. # error STLSoft does not support Intel C/C++ in compatibility mode with versions of Visual C++ less than 6.0
  96. #endif
  97. /* For this to work, -Qvc7.1 must be defined. */
  98. #if __INTEL_COMPILER == 700 && \
  99. _MSC_VER == 1310
  100. # define STLSOFT_INCL_H_STLSOFT_CCCAP_INTEL_7_1
  101. #endif /* __INTEL_COMPILER == 700 && _MSC_VER == 1310 */
  102. /* /////////////////////////////////////////////////////////////////////////
  103. * Preprocessor features
  104. *
  105. * - #pragma message
  106. * - #pragma once
  107. * - __COUNTER__
  108. * - __FUNCTION__
  109. * - variadic macros
  110. */
  111. #define STLSOFT_PPF_pragma_message_SUPPORT
  112. #if __INTEL_COMPILER >= 700
  113. # define STLSOFT_PPF_pragma_once_SUPPORT
  114. #endif /* compiler */
  115. #if __INTEL_COMPILER >= 700
  116. # define STLSOFT_PPF_COUNTER_SYMBOL_SUPPORT
  117. #endif /* compiler */
  118. #if __INTEL_COMPILER >= 700
  119. # define STLSOFT_PPF_FUNCTION_SYMBOL_SUPPORT
  120. #endif /* compiler */
  121. /* TODO: check this
  122. # define STLSOFT_PPF_VARIADIC_MACROS_SUPPORT
  123. */
  124. /* /////////////////////////////////////////////////////////////////////////
  125. * Support for built-in types
  126. *
  127. * - bool
  128. * - wchar_t
  129. * - long long
  130. * - __int8
  131. * - __int16
  132. * - __int32
  133. * - __int64
  134. * - long double
  135. */
  136. #if !defined(_MSC_VER) || \
  137. defined(__BOOL_DEFINED)
  138. # define STLSOFT_CF_BUILTIN_bool_SUPPORT
  139. #endif /* !_MSC_VER || __BOOL_DEFINED */
  140. #ifdef _NATIVE_WCHAR_T_DEFINED
  141. # define STLSOFT_CF_BUILTIN_wchar_t_SUPPORT
  142. #endif /* _NATIVE_WCHAR_T_DEFINED */
  143. /*
  144. # define STLSOFT_CF_BUILTIN_long_long_SUPPORT
  145. */
  146. #define STLSOFT_CF_BUILTIN___int8_SUPPORT
  147. #define STLSOFT_CF_BUILTIN___int16_SUPPORT
  148. #define STLSOFT_CF_BUILTIN___int32_SUPPORT
  149. #if _MSC_VER >= 1020
  150. # define STLSOFT_CF_BUILTIN___int64_SUPPORT
  151. #endif /* _MSC_VER >= 1020 */
  152. /* /////////////////////////////////////////////////////////////////////////
  153. * Built-in type characteristics
  154. *
  155. * - char is unsigned
  156. * - wchar_t
  157. * - synthesised
  158. * - available
  159. */
  160. #ifdef _CHAR_UNSIGNED
  161. # define STLSOFT_CF_CHAR_IS_UNSIGNED
  162. #endif /* _CHAR_UNSIGNED */
  163. #if !defined(STLSOFT_CF_BUILTIN_wchar_t_SUPPORT) && \
  164. defined(_WCHAR_T_DEFINED)
  165. # define STLSOFT_CF_wchar_t_IS_SYNTHESISED
  166. #endif /* !STLSOFT_CF_BUILTIN_wchar_t_SUPPORT && _WCHAR_T_DEFINED */
  167. /* /////////////////////////////////////////////////////////////////////////
  168. * Support for C/C++ language features
  169. *
  170. * - return void
  171. * - static assertions
  172. * - anonymous unions
  173. * - -ve % +ve => -ve result
  174. */
  175. #if __INTEL_COMPILER >= 700
  176. # define STLSOFT_CF_return_void_SUPPORT
  177. #endif /* compiler */
  178. #define STLSOFT_CF_STATIC_ASSERT_SUPPORT
  179. #define STLSOFT_CF_ANONYMOUS_UNION_SUPPORT
  180. #define STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT
  181. /* /////////////////////////////////////////////////////////////////////////
  182. * Support for C language features
  183. *
  184. * - inline
  185. * - C99 inline keyword
  186. * - compiler-specific keyword
  187. */
  188. /* #define STLSOFT_CF_C99_INLINE_SUPPORT */
  189. #define STLSOFT_CUSTOM_C_INLINE __inline
  190. /* /////////////////////////////////////////////////////////////////////////
  191. * Support for C++ language features - 1
  192. *
  193. * - exceptions
  194. * - exception signatures
  195. * - exception signatures expense
  196. * - operator new throws bad_alloc
  197. * - RTTI
  198. * - namespaces
  199. * - STLSoft namespace(s)?
  200. * - member constants
  201. * - explicit keyword
  202. * - mutable keyword
  203. * - template keyword
  204. * - typename keyword
  205. * - in a template parameter
  206. * - type disambiguation inside template bodies
  207. * - disambiguation in default template arguments
  208. * - type disambiguation inside initialiser lists in class template constructors
  209. * - type disambiguation the return types in templates
  210. * - argument-dependent lookup
  211. * - static array-size determination
  212. * - empty-derived optimisation
  213. * -
  214. * - empty-base optimisation
  215. * -
  216. * - move constructor support
  217. * - operators
  218. * - operator bool implemented as pointer-to-member
  219. * - operator ! implemented as pointer-to-member
  220. */
  221. #ifdef _CPPUNWIND
  222. # define STLSOFT_CF_EXCEPTION_SUPPORT
  223. # if defined(_MSC_VER) && \
  224. _MSC_VER >= 1100
  225. # define STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
  226. # endif /* _MSC_VER */
  227. /* TODO: check this
  228. # define STLSOFT_CF_EXCEPTION_SPEC_EXPENSIVE
  229. */
  230. # if ( defined(_MSC_VER) && \
  231. _MSC_VER >= 1300) || \
  232. ( !defined(_MSC_VER) && \
  233. __INTEL_COMPILER >= 900)
  234. # define STLSOFT_CF_EXCEPTION_OPERATOR_NEW_THROWS_BAD_ALLOC
  235. # endif /* VC++ 13+ / Intel C/C++ 9+ */
  236. #endif /* _CPPUNWIND */
  237. #ifdef _CPPRTTI
  238. # define STLSOFT_CF_RTTI_SUPPORT
  239. #endif /* _CPPRTTI */
  240. #ifdef __cplusplus
  241. # define STLSOFT_CF_NAMESPACE_SUPPORT
  242. #endif /* __cplusplus */
  243. /*
  244. # define _STLSOFT_NO_NAMESPACES
  245. */
  246. #define STLSOFT_CF_MEMBER_CONSTANT_SUPPORT
  247. #define STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
  248. #define STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
  249. /*
  250. # define STLSOFT_CF_TEMPLATE_QUALIFIER_KEYWORD_SUPPORT
  251. */
  252. #define STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
  253. #define STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
  254. #define STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
  255. #define STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
  256. #define STLSOFT_CF_TYPENAME_TYPE_RET_KEYWORD_SUPPORT
  257. #if defined(STLSOFT_INCL_H_STLSOFT_CCCAP_INTEL_7_1) || \
  258. __INTEL_COMPILER >= 800
  259. # define STLSOFT_CF_ADL_SUPPORT
  260. #endif /* STLSOFT_INCL_H_STLSOFT_CCCAP_INTEL_7_1 || __INTEL_COMPILER >= 800 */
  261. #define STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT
  262. #ifdef _MSC_EXTENSIONS
  263. # define STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
  264. #endif /* _MSC_EXTENSIONS */
  265. #if !defined(_MSC_VER) || \
  266. _MSC_VER >= 1300
  267. # define STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT
  268. # define STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT
  269. #endif /* !_MSC_VER || _MSC_VER >= 1300 */
  270. /*
  271. # define STLSOFT_CF_REQUIRE_RETURN_ALWAYS
  272. */
  273. /* /////////////////////////////////////////////////////////////////////////
  274. * Support for C++ language features - 2
  275. *
  276. * - templates
  277. * - specialisation syntax (template <>)
  278. * - partial specialisation
  279. * - function template
  280. * - class template
  281. * - member class template
  282. * - member function template
  283. * - member range function template
  284. * - constructor template
  285. * - template template
  286. * - class template fundamental argument
  287. * - class template type argument
  288. * - class template member function argument
  289. * - class template default fundamental argument
  290. * - class template default type argument
  291. * - function template parameter list requires template parameter
  292. * - member function template overload is properly discriminated against
  293. * other non-template member function
  294. * - constructor template overload is properly discriminated against
  295. * other non-template constructor
  296. * - copy-constructor template overload is properly discriminated against
  297. * other non-template copy-constructor
  298. */
  299. #define STLSOFT_CF_TEMPLATE_SUPPORT
  300. #define STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX_SUPPORT
  301. #define STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
  302. #define STLSOFT_CF_TEMPLATE_FUNCTION_TEMPLATE_SUPPORT
  303. #define STLSOFT_CF_TEMPLATE_CLASS_TEMPLATE_SUPPORT
  304. #define STLSOFT_CF_TEMPLATE_MEMBER_CLASS_TEMPLATE_SUPPORT
  305. #define STLSOFT_CF_TEMPLATE_MEMBER_FUNCTION_TEMPLATE_SUPPORT
  306. #define STLSOFT_CF_TEMPLATE_MEMBER_RANGE_FUNCTION_TEMPLATE_SUPPORT
  307. #define STLSOFT_CF_TEMPLATE_CTOR_TEMPLATE_SUPPORT
  308. #define STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT
  309. #define STLSOFT_CF_TEMPLATE_FUNDAMENTAL_PARAMETER_SUPPORT
  310. #define STLSOFT_CF_TEMPLATE_TYPE_PARAMETER_SUPPORT
  311. #define STLSOFT_CF_TEMPLATE_MEMBER_FUNCTION_PARAMETER_SUPPORT
  312. #define STLSOFT_CF_TEMPLATE_DEFAULT_FUNDAMENTAL_PARAMETER_SUPPORT
  313. #define STLSOFT_CF_TEMPLATE_DEFAULT_TYPE_PARAMETER_SUPPORT
  314. #define STLSOFT_CF_TEMPLATE_FUNCTION_TEMPLATE_REQUIRES_TEMPLATE_PARAMETERS_IN_FUNCTION_PARAMETER_LIST
  315. #define STLSOFT_CF_TEMPLATE_MEMBER_FUNCTION_TEMPLATE_OVERLOAD_DISCRIMINATED_AGAINST_NON_TEMPLATE_MEMBER_FUNCTION
  316. #define STLSOFT_CF_TEMPLATE_CONSTRUCTOR_TEMPLATE_OVERLOAD_DISCRIMINATED_AGAINST_NON_TEMPLATE_CONSTRUCTOR
  317. /* TODO: check this
  318. # define STLSOFT_CF_TEMPLATE_COPY_CONSTRUCTOR_TEMPLATE_OVERLOAD_DISCRIMINATED_AGAINST_NON_TEMPLATE_COPY_CONSTRUCTOR
  319. */
  320. /* /////////////////////////////////////////////////////////////////////////
  321. * Inline assembler
  322. */
  323. #if defined(_M_IX86)
  324. # define STSLSOFT_INLINE_ASM_SUPPORTED
  325. # define STSLSOFT_ASM_IN_INLINE_SUPPORTED
  326. #elif defined(_M_IA64) || \
  327. defined(_M_X64)
  328. /* Inline assembler not supported for Intel C/C++ 64-bit compilers */
  329. #endif /* arch */
  330. /* /////////////////////////////////////////////////////////////////////////
  331. * Calling convention
  332. *
  333. * On x86 (Windows), the following are supported:
  334. * - cdecl
  335. * - fastcall
  336. * - stdcall
  337. *
  338. * On IA64/x64 there is only a single calling convention. Calling convention
  339. * keywords are ignored.
  340. */
  341. #if defined(_M_IX86)
  342. # define STLSOFT_CF_THISCALL_SUPPORTED
  343. # define STLSOFT_CF_CDECL_SUPPORTED
  344. # ifndef _MANAGED
  345. # define STLSOFT_CF_FASTCALL_SUPPORTED
  346. # endif /* !_MANAGED */
  347. # define STLSOFT_CF_STDCALL_SUPPORTED
  348. # define STLSOFT_CDECL __cdecl
  349. # ifndef _MANAGED
  350. # define STLSOFT_FASTCALL __fastcall
  351. # endif /* !_MANAGED */
  352. # define STLSOFT_STDCALL __stdcall
  353. #elif defined(_M_IA64) || \
  354. defined(_M_X64)
  355. # define STLSOFT_CF_CDECL_SUPPORTED
  356. # define STLSOFT_CDECL
  357. #elif defined(unix) || \
  358. defined(__unix__)
  359. # define STLSOFT_CF_CDECL_SUPPORTED
  360. # define STLSOFT_CDECL
  361. #else /* ? arch */
  362. # error Only defined for the Intel x86, IA64 and x64 architectures
  363. #endif /* arch */
  364. /* /////////////////////////////////////////////////////////////////////////
  365. * Integer sizes
  366. */
  367. #if defined(__LP64__)
  368. # define _STLSOFT_SIZEOF_CHAR (1)
  369. # define _STLSOFT_SIZEOF_SHORT (2)
  370. # define _STLSOFT_SIZEOF_INT (4)
  371. # define _STLSOFT_SIZEOF_LONG (8)
  372. # define _STLSOFT_SIZEOF_LONG_LONG (8)
  373. #elif defined(_WIN32) || \
  374. defined(_WIN64)
  375. # define _STLSOFT_SIZEOF_CHAR (1)
  376. # define _STLSOFT_SIZEOF_SHORT (2)
  377. # define _STLSOFT_SIZEOF_INT (4)
  378. # define _STLSOFT_SIZEOF_LONG (4)
  379. # define _STLSOFT_SIZEOF_LONG_LONG (8)
  380. #else /* ? data model */
  381. # error Use of Intel C/C++ has not been verified on any operation system other than Win32. Please contact Synesis Software
  382. #endif /* data model */
  383. /* /////////////////////////////////////////////////////////////////////////
  384. * Size-specific integer types
  385. *
  386. * The purpose of this section is to define the following types:
  387. *
  388. * - 8-bit signed and unsigned integers
  389. * - 16-bit signed and unsigned integers
  390. * - 32-bit signed and unsigned integers
  391. * - (optionally) 64-bit signed and unsigned integers
  392. *
  393. * and to define, where appropriate the following symbols (used for
  394. * overloading):
  395. *
  396. * - STLSOFT_CF_CHAR_DISTINCT_INT_TYPE
  397. * - STLSOFT_CF_SHORT_DISTINCT_INT_TYPE
  398. * - STLSOFT_CF_INT_DISTINCT_INT_TYPE
  399. * - STLSOFT_CF_LONG_DISTINCT_INT_TYPE
  400. * - STLSOFT_CF_LONG_LONG_DISTINCT_INT_TYPE
  401. *
  402. * which indicate that a given type is not used in the size-specific types.
  403. */
  404. /* 8-bit integer */
  405. #define STLSOFT_CF_8BIT_INT_SUPPORT
  406. #define STLSOFT_SI08_T_BASE_TYPE signed __int8
  407. #define STLSOFT_UI08_T_BASE_TYPE unsigned __int8
  408. #if _MSC_VER == 1200
  409. # define STLSOFT_CF_CHAR_DISTINCT_INT_TYPE
  410. #endif /* _MSC_VER */
  411. /* 16-bit integer */
  412. #define STLSOFT_CF_16BIT_INT_SUPPORT
  413. #define STLSOFT_SI16_T_BASE_TYPE signed __int16
  414. #define STLSOFT_UI16_T_BASE_TYPE unsigned __int16
  415. #if _MSC_VER == 1200
  416. # define STLSOFT_CF_SHORT_DISTINCT_INT_TYPE
  417. #endif /* _MSC_VER */
  418. /* 32-bit integer */
  419. #define STLSOFT_CF_32BIT_INT_SUPPORT
  420. #define STLSOFT_SI32_T_BASE_TYPE signed __int32
  421. #define STLSOFT_UI32_T_BASE_TYPE unsigned __int32
  422. #if _MSC_VER == 1200
  423. # define STLSOFT_CF_INT_DISTINCT_INT_TYPE
  424. #endif /* _MSC_VER */
  425. #define STLSOFT_CF_LONG_DISTINCT_INT_TYPE
  426. /* 64-bit integer */
  427. #define STLSOFT_CF_64BIT_INT_SUPPORT
  428. #define STLSOFT_CF_64BIT_INT_IS___int64
  429. #define STLSOFT_SI64_T_BASE_TYPE signed __int64
  430. #define STLSOFT_UI64_T_BASE_TYPE unsigned __int64
  431. /* /////////////////////////////////////////////////////////////////////////
  432. * Still to-be-determined features
  433. */
  434. #if defined(_MSC_VER)
  435. # if _MSC_VER >= 1300
  436. /* Even though VC 7.0 and 7.1 provide a native wchar_t type, that is __wchar_t,
  437. * it is not compatible with their libraries (which use the typedef wchar_t),
  438. * so we cannot use it.
  439. *
  440. * wchar_t itself may be used, when _NATIVE_WCHAR_T_DEFINED is defined
  441. */
  442. # ifdef _NATIVE_WCHAR_T_DEFINED
  443. # define STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
  444. # elif defined(_WCHAR_T_DEFINED)
  445. # define STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
  446. # else
  447. /* Not defined */
  448. # define STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
  449. # endif /* _WCHAR_T_DEFINED */
  450. # else
  451. /* Previous versions do not have a native type, but do have the typedef wchar_t
  452. * when _WCHAR_T_DEFINED is defined
  453. */
  454. # if defined(_WCHAR_T_DEFINED)
  455. # define STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
  456. # else
  457. /* Not defined */
  458. # endif /* _WCHAR_T_DEFINED */
  459. # endif /* _MSC_VER */
  460. #endif /* _MSC_VER */
  461. #define STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
  462. #define STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
  463. #define STLSOFT_CF_std_NAMESPACE
  464. #define STLSOFT_CF_std_char_traits_AVAILABLE
  465. #define STLSOFT_CF_PARENT_TYPES_CAN_BE_USED_IN_NON_TEMPLATE
  466. #define STLSOFT_CF_PARENT_TYPES_CAN_BE_USED_IN_TEMPLATE
  467. #define STLSOFT_CF_VENEER_SUPPORT
  468. #if !defined(_ATL_MIN_CRT)
  469. # define STLSOFT_CF_ALLOCATOR_BASE_EXPENSIVE
  470. #endif /* !_ATL_MIN_CRT */
  471. /*
  472. # define STLSOFT_CF_COMPILER_WARNS_NO_PUBLIC_DTOR
  473. */
  474. /*
  475. # define STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED
  476. */
  477. /* /////////////////////////////////////////////////////////////////////////
  478. * Quality assurance features
  479. */
  480. #if defined(_STLSOFT_CUSTOM_ASSERT)
  481. /* You have defined the preprocessor symbol _STLSOFT_CUSTOM_ASSERT,
  482. * which stipulates that you will be providing your own assert. This
  483. * requires that you have defined _STLSOFT_CUSTOM_ASSERT() as a macro
  484. * taking 1 parameter (the condition to assert).
  485. *
  486. * Suppose you have a function DisplayAssert_(), which has the
  487. * following signature:
  488. *
  489. * void DisplayAssert_(char const* file, int line, char const* expression);
  490. *
  491. * Presumably you would also have your own assert macro, say MY_ASSERT(),
  492. * defined as:
  493. *
  494. * #define MY_ASSERT(_x) ((void)((!(_x)) ? ((void)(DisplayAssert_(__FILE__, __LINE__, #_x))) : ((void)0)))
  495. *
  496. * so you would simply need to define _STLSOFT_CUSTOM_ASSERT() in terms of
  497. * MY_ASSERT(), as in:
  498. *
  499. * #define _STLSOFT_CUSTOM_ASSERT(_x) MY_ASSERT(_x)
  500. *
  501. * where
  502. */
  503. # define __STLSOFT_CF_ASSERT_SUPPORT
  504. # define STLSOFT_CF_ASSERT_SUPPORT
  505. # define STLSOFT_ASSERT(_x) _STLSOFT_CUSTOM_ASSERT(_x)
  506. # if defined(_STLSOFT_CUSTOM_ASSERT_INCLUDE)
  507. # define __STLSOFT_CF_ASSERT_INCLUDE_NAME _STLSOFT_CUSTOM_ASSERT_INCLUDE
  508. # else /* ? _STLSOFT_CUSTOM_ASSERT_INCLUDE */
  509. # error You must define _STLSOFT_CUSTOM_ASSERT_INCLUDE along with _STLSOFT_CUSTOM_ASSERT()
  510. # endif /* !_STLSOFT_CUSTOM_ASSERT_INCLUDE */
  511. #else /* ? _STLSOFT_CUSTOM_ASSERT */
  512. # define __STLSOFT_CF_ASSERT_SUPPORT
  513. # define STLSOFT_CF_ASSERT_SUPPORT
  514. //#define __STLSOFT_CF_USE_cassert
  515. # ifdef _MSC_VER
  516. # if defined(__cplusplus) && \
  517. _MSC_VER >= 1200
  518. # include <new> /* Used to ensure that the headers don't get confused between <new> and
  519. * <crtdbg.h>, which results in balking on exception specifications on op new
  520. */
  521. # endif /* C++ && _MSC_VER >= 1300 */
  522. # define __STLSOFT_CF_ASSERT_INCLUDE_NAME <crtdbg.h>
  523. # define STLSOFT_ASSERT(_x) _ASSERTE(_x)
  524. # else /* _MSC_VER */
  525. # define __STLSOFT_CF_ASSERT_INCLUDE_NAME <assert.h>
  526. # define STLSOFT_ASSERT(_x) assert(_x)
  527. # endif /* _MSC_VER */
  528. #endif /* _STLSOFT_CUSTOM_ASSERT */
  529. /* /////////////////////////////////////////////////////////////////////////
  530. * Compiler warning suppression
  531. */
  532. #ifdef _DEBUG
  533. /* Suppresses: "expression has no effect" */
  534. # pragma warning(disable : 174)
  535. #endif /* _DEBUG */
  536. /* Suppresses: "controlling expression is constant" */
  537. #pragma warning(disable : 279)
  538. #ifdef _DEBUG
  539. /* Suppresses: "value copied to temporary, reference to temporary used" */
  540. # pragma warning(disable : 383)
  541. #endif /* _DEBUG */
  542. /* Suppresses: "operands are evaluated in unspecified order" */
  543. #pragma warning(disable : 981)
  544. /* /////////////////////////////////////////////////////////////////////////
  545. * Obsolete features
  546. */
  547. #include <stlsoft/internal/cccap/obsolete.h>
  548. /* ///////////////////////////// end of file //////////////////////////// */