00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: stlsoft/internal/cccap/vectorc.h 00003 * 00004 * Purpose: Compiler feature discrimination for CodePlay Vector C. 00005 * 00006 * Created: 3rd October 2003 00007 * Updated: 14th February 2010 00008 * 00009 * Home: http://stlsoft.org/ 00010 * 00011 * Copyright (c) 2003-2010, Matthew Wilson and Synesis Software 00012 * All rights reserved. 00013 * 00014 * Redistribution and use in source and binary forms, with or without 00015 * modification, are permitted provided that the following conditions are met: 00016 * 00017 * - Redistributions of source code must retain the above copyright notice, this 00018 * list of conditions and the following disclaimer. 00019 * - Redistributions in binary form must reproduce the above copyright notice, 00020 * this list of conditions and the following disclaimer in the documentation 00021 * and/or other materials provided with the distribution. 00022 * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of 00023 * any contributors may be used to endorse or promote products derived from 00024 * this software without specific prior written permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00027 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00028 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00029 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00030 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00031 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00032 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00033 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00034 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00035 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00036 * POSSIBILITY OF SUCH DAMAGE. 00037 * 00038 * ////////////////////////////////////////////////////////////////////// */ 00039 00040 00041 #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT 00042 # error This file must not be included independently of stlsoft/stlsoft.h 00043 #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */ 00044 00051 #ifdef STLSOFT_INCL_H_STLSOFT_CCCAP_VECTORC 00052 # error This file cannot be included more than once in any compilation unit 00053 #endif /* STLSOFT_INCL_H_STLSOFT_CCCAP_VECTORC */ 00054 00055 /* ////////////////////////////////////////////////////////////////////// */ 00056 00057 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION 00058 # define STLSOFT_VER_H_STLSOFT_CCCAP_VECTORC_MAJOR 3 00059 # define STLSOFT_VER_H_STLSOFT_CCCAP_VECTORC_MINOR 18 00060 # define STLSOFT_VER_H_STLSOFT_CCCAP_VECTORC_REVISION 2 00061 # define STLSOFT_VER_H_STLSOFT_CCCAP_VECTORC_EDIT 59 00062 #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */ 00063 00064 /* ///////////////////////////////////////////////////////////////////////// 00065 * Auto-generation and compatibility 00066 */ 00067 00068 /* 00069 [<[STLSOFT-AUTO:NO-DOCFILELABEL]>] 00070 [<[STLSOFT-AUTO:NO-UNITTEST]>] 00071 */ 00072 00073 /* ///////////////////////////////////////////////////////////////////////// 00074 * Compiler features 00075 */ 00076 00077 /* Messaging 00078 */ 00079 00080 #ifdef _MSC_VER 00081 # define STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT 00082 #endif /* _MSC_VER */ 00083 00084 /* Support for #pragma once 00085 */ 00086 00087 /* #define STLSOFT_CF_PRAGMA_ONCE_SUPPORT */ 00088 00089 /* Support for __FUNCTION__ 00090 */ 00091 00092 /* #define STLSOFT_CF_FUNCTION_SYMBOL_SUPPORT */ 00093 00094 /* Variadic Macros 00095 */ 00096 00097 /* #define STLSOFT_CF_SUPPORTS_VARIADIC_MACROS */ 00098 00099 /* Types: 00100 */ 00101 00102 /* bool */ 00103 #ifdef __cplusplus 00104 # define STLSOFT_CF_NATIVE_BOOL_SUPPORT 00105 #endif /* __cplusplus */ 00106 00107 /* char (sign) */ 00108 #ifdef _CHAR_UNSIGNED 00109 # define STLSOFT_CF_CHAR_IS_UNSIGNED 00110 #endif /* _CHAR_UNSIGNED */ 00111 00112 /* wchar_t */ 00113 /* # define STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT */ 00114 00115 /* ////////////////////////////////////////////////////////////////////// */ 00116 /* ////////////////////////////////////////////////////////////////////// */ 00117 /* ////////////////////////////////////////////////////////////////////// */ 00118 /* ////////////////////////////////////////////////////////////////////// */ 00119 /* ////////////////////////////////////////////////////////////////////// */ 00120 /* ////////////////////////////////////////////////////////////////////// */ 00121 /* ////////////////////////////////////////////////////////////////////// */ 00122 /* ////////////////////////////////////////////////////////////////////// */ 00123 /* ////////////////////////////////////////////////////////////////////// */ 00124 /* ////////////////////////////////////////////////////////////////////// */ 00125 00126 /* ///////////////////////////////////////////////////////////////////////// 00127 * Integral types 00128 * 00129 * The purpose of this section is to define the following types: 00130 * 00131 * - 8-bit signed and unsigned integers 00132 * - 16-bit signed and unsigned integers 00133 * - 32-bit signed and unsigned integers 00134 * - (optionally) 64-bit signed and unsigned integers 00135 * 00136 * and to define, where appropriate the following symbols (used for 00137 * overloading): 00138 * 00139 * - STLSOFT_CF_CHAR_DISTINCT_INT_TYPE 00140 * - STLSOFT_CF_SHORT_DISTINCT_INT_TYPE 00141 * - STLSOFT_CF_INT_DISTINCT_INT_TYPE 00142 * - STLSOFT_CF_LONG_DISTINCT_INT_TYPE 00143 * - STLSOFT_CF_LONG_LONG_DISTINCT_INT_TYPE 00144 * 00145 * which indicate that a given type is not used in the size-specific types. 00146 */ 00147 00148 #define _STLSOFT_SIZEOF_CHAR (1) 00149 #define _STLSOFT_SIZEOF_SHORT (2) 00150 #define _STLSOFT_SIZEOF_INT (4) 00151 #define _STLSOFT_SIZEOF_LONG (4) 00152 #define _STLSOFT_SIZEOF_LONG_LONG (8) 00153 00154 /* 8-bit integer */ 00155 #define STLSOFT_CF_8BIT_INT_SUPPORT 00156 #define STLSOFT_SI08_T_BASE_TYPE signed char 00157 #define STLSOFT_UI08_T_BASE_TYPE unsigned char 00158 00159 /* 16-bit integer */ 00160 #define STLSOFT_CF_16BIT_INT_SUPPORT 00161 #define STLSOFT_SI16_T_BASE_TYPE signed short 00162 #define STLSOFT_UI16_T_BASE_TYPE unsigned short 00163 00164 /* 32-bit integer */ 00165 #define STLSOFT_CF_32BIT_INT_SUPPORT 00166 #define STLSOFT_SI32_T_BASE_TYPE signed int 00167 #define STLSOFT_UI32_T_BASE_TYPE unsigned int 00168 #define STLSOFT_CF_LONG_DISTINCT_INT_TYPE 00169 00170 #define STLSOFT_CF_64BIT_INT_SUPPORT 00171 #define STLSOFT_CF_64BIT_INT_IS_long_long 00172 #define STLSOFT_SI64_T_BASE_TYPE signed long long 00173 #define STLSOFT_UI64_T_BASE_TYPE unsigned long long 00174 00175 00176 /* Member constants */ 00177 #define STLSOFT_CF_MEMBER_CONSTANT_SUPPORT 00178 00179 /* Static assertions */ 00180 #define STLSOFT_CF_STATIC_ASSERT_SUPPORT 00181 00182 /* RTTI support */ 00183 #ifdef __CPPRTTI 00184 # define STLSOFT_CF_RTTI_SUPPORT 00185 #else /* ? __CPPRTTI */ 00186 /* Not defined */ 00187 #endif /* __CPPRTTI */ 00188 00189 /* Exception support */ 00190 # ifdef __CPPUNWIND 00191 # define STLSOFT_CF_EXCEPTION_SUPPORT 00192 # else 00193 /* Not defined */ 00194 # endif /* __CPPUNWIND */ 00195 00196 /* */ 00197 #define STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED 00198 00199 /* Namespace support */ 00200 /* #define _STLSOFT_NO_NAMESPACES */ 00201 00202 #ifdef __cplusplus 00203 # define STLSOFT_CF_NAMESPACE_SUPPORT 00204 #endif /* __cplusplus */ 00205 00206 #define STLSOFT_CF_ANONYMOUS_UNION_SUPPORT 00207 00208 /* #define STLSOFT_CF_COMPILER_SUPPORTS_RETURN_VOID */ 00209 00210 /* Template support */ 00211 #define STLSOFT_CF_TEMPLATE_SUPPORT 00212 00213 /* #define STLSOFT_CF_TEMPLATE_TYPE_REQUIRED_IN_ARGS */ 00214 00215 # ifdef __CPPUNWIND 00216 # define STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT 00217 # else 00218 /* Not defined */ 00219 # endif /* __CPPUNWIND */ 00220 00221 /* #define STLSOFT_CF_EXCEPTION_SPEC_EXPENSIVE */ 00222 00223 00224 /* #define STLSOFT_CF_THROW_BAD_ALLOC */ 00225 00226 #define STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT 00227 00228 #define STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT 00229 00230 #define STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT 00231 00232 #define STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT 00233 00234 #define STLSOFT_CF_MEMBER_TEMPLATE_OVERLOAD_DISCRIMINATED 00235 00236 #define STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT 00237 00238 #define STLSOFT_CF_MEMBER_TEMPLATE_CTOR_OVERLOAD_DISCRIMINATED 00239 00240 #define STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT 00241 00242 #define STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT 00243 00244 #define STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX 00245 00246 /* #define STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */ 00247 00248 # ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT 00249 # undef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT 00250 # endif /* STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT */ 00251 00252 #define STLSOFT_CF_std_NAMESPACE 00253 00254 #define STLSOFT_CF_std_char_traits_AVAILABLE 00255 00256 /* #define STLSOFT_CF_PARENT_TYPES_CAN_BE_USED_IN_NON_TEMPLATE */ 00257 00258 /* #define STLSOFT_CF_PARENT_TYPES_CAN_BE_USED_IN_TEMPLATE */ 00259 00260 #define STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT 00261 00262 #define STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT 00263 00264 #define STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT 00265 00266 #define STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT 00267 00268 /* #define STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT */ 00269 00270 /* #define STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT */ 00271 00272 /* #define STLSOFT_CF_TYPENAME_TYPE_RET_KEYWORD_SUPPORT */ 00273 00274 /* #define STLSOFT_CF_TEMPLATE_QUALIFIER_KEYWORD_SUPPORT */ 00275 00276 /* #define STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT */ 00277 00278 /* #define STLSOFT_CF_ADL_LOOKUP_SUPPORT */ 00279 00280 /* #define STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT */ 00281 00282 /* Unfortunately, VectorC cannot work with arrays of const char, and when an overload of 00283 * ss_static_array_size() is provided it goes into an infinte loop. 00284 */ 00285 /* #define STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT */ 00286 00287 #define STLSOFT_CF_VENEER_SUPPORT 00288 00289 #define STLSOFT_CF_ALLOCATOR_BASE_EXPENSIVE 00290 00291 /* #define STLSOFT_CF_COMPILER_WARNS_NO_PUBLIC_DTOR */ 00292 00293 #define STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED 00294 00295 #define STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT 00296 00297 /* #define STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT */ 00298 /* #define STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT */ 00299 00300 /* ///////////////////////////////////////////////////////////////////////// 00301 * Quality assurance features 00302 */ 00303 00304 #if defined(_STLSOFT_CUSTOM_ASSERT) 00305 /* You have defined the pre-processor symbol _STLSOFT_CUSTOM_ASSERT, 00306 * which stipulates that you will be providing your own assert. This 00307 * requires that you have defined _STLSOFT_CUSTOM_ASSERT() as a macro 00308 * taking 1 parameter (the condition to assert). 00309 * 00310 * Suppose you have a function DisplayAssert_(), which has the 00311 * following signature: 00312 * 00313 * void DisplayAssert_(char const* file, int line, char const* expression); 00314 * 00315 * Presumably you would also have your own assert macro, say MY_ASSERT(), 00316 * defined as: 00317 * 00318 * #define MY_ASSERT(_x) ((void)((!(_x)) ? ((void)(DisplayAssert_(__FILE__, __LINE__, #_x))) : ((void)0))) 00319 * 00320 * so you would simply need to define _STLSOFT_CUSTOM_ASSERT() in terms of 00321 * MY_ASSERT(), as in: 00322 * 00323 * #define _STLSOFT_CUSTOM_ASSERT(_x) MY_ASSERT(_x) 00324 * 00325 * You must also specify the include header name containing your 00326 * custom assertion declaration, in the preprocessor symbol 00327 * _STLSOFT_CUSTOM_ASSERT_INCLUDE 00328 */ 00329 # define __STLSOFT_CF_ASSERT_SUPPORT 00330 # define STLSOFT_CF_ASSERT_SUPPORT 00331 # define STLSOFT_ASSERT(_x) _STLSOFT_CUSTOM_ASSERT(_x) 00332 # if defined(_STLSOFT_CUSTOM_ASSERT_INCLUDE) 00333 # define __STLSOFT_CF_ASSERT_INCLUDE_NAME _STLSOFT_CUSTOM_ASSERT_INCLUDE 00334 # else 00335 # error You must define _STLSOFT_CUSTOM_ASSERT_INCLUDE along with _STLSOFT_CUSTOM_ASSERT() 00336 # endif /* !_STLSOFT_CUSTOM_ASSERT_INCLUDE */ 00337 #else /* ? _STLSOFT_CUSTOM_ASSERT */ 00338 # ifndef _DEBUG 00339 /* # define NDEBUG */ 00340 # endif /* _DEBUG */ */ 00341 # define __STLSOFT_CF_ASSERT_SUPPORT 00342 # define STLSOFT_CF_ASSERT_SUPPORT 00343 # define __STLSOFT_CF_ASSERT_INCLUDE_NAME <assert.h> 00344 # define STLSOFT_ASSERT(_x) assert(_x) 00345 #endif /* _STLSOFT_CUSTOM_ASSERT */ 00346 00347 /* ///////////////////////////////////////////////////////////////////////// 00348 * Calling convention 00349 */ 00350 00351 #define STLSOFT_CF_THISCALL_SUPPORTED 00352 #define STLSOFT_CF_CDECL_SUPPORTED 00353 #define STLSOFT_CF_FASTCALL_SUPPORTED 00354 #define STLSOFT_CF_STDCALL_SUPPORTED 00355 00356 #ifdef STLSOFT_CF_CDECL_SUPPORTED 00357 # define STLSOFT_CDECL __cdecl 00358 #endif /* STLSOFT_CF_CDECL_SUPPORTED */ 00359 #ifdef STLSOFT_CF_FASTCALL_SUPPORTED 00360 # define STLSOFT_FASTCALL __fastcall 00361 #endif /* STLSOFT_CF_FASTCALL_SUPPORTED */ 00362 #ifdef STLSOFT_CF_STDCALL_SUPPORTED 00363 # define STLSOFT_STDCALL __stdcall 00364 #endif /* STLSOFT_CF_STDCALL_SUPPORTED */ 00365 00366 /* ///////////////////////////////////////////////////////////////////////// 00367 * Inline assembler 00368 */ 00369 00370 #define STSLSOFT_INLINE_ASM_SUPPORTED 00371 #define STSLSOFT_ASM_IN_INLINE_SUPPORTED 00372 00373 /* ///////////////////////////////////////////////////////////////////////// 00374 * Compiler warning suppression 00375 */ 00376 00377 /* ///////////////////////////// end of file //////////////////////////// */