Nugget
config.h
1 // Copyright (c) Electronic Arts Inc. All rights reserved.
4 
5 
6 #ifndef EASTL_INTERNAL_CONFIG_H
7 #define EASTL_INTERNAL_CONFIG_H
8 
9 #include <stdint.h>
10 
11 
13 // ReadMe
14 //
15 // This is the EASTL configuration file. All configurable parameters of EASTL
16 // are controlled through this file. However, all the settings here can be
17 // manually overridden by the user. There are three ways for a user to override
18 // the settings in this file:
19 //
20 // - Simply edit this file.
21 // - Define EASTL_USER_CONFIG_HEADER.
22 // - Predefine individual defines (e.g. EASTL_ASSERT).
23 //
25 
26 
27 
28 
30 // EASTL_USER_CONFIG_HEADER
31 //
32 // This allows the user to define a header file to be #included before the
33 // EASTL config.h contents are compiled. A primary use of this is to override
34 // the contents of this config.h file. Note that all the settings below in
35 // this file are user-overridable.
36 //
37 // Example usage:
38 // #define EASTL_USER_CONFIG_HEADER "MyConfigOverrides.h"
39 // #include <EASTL/vector.h>
40 //
42 
43 #ifdef EASTL_USER_CONFIG_HEADER
44  #include EASTL_USER_CONFIG_HEADER
45 #endif
46 
47 
48 
50 // EASTL_EABASE_DISABLED
51 //
52 // The user can disable EABase usage and manually supply the configuration
53 // via defining EASTL_EABASE_DISABLED and defining the appropriate entities
54 // globally or via the above EASTL_USER_CONFIG_HEADER.
55 //
56 // Example usage:
57 // #define EASTL_EABASE_DISABLED
58 // #include <EASTL/vector.h>
59 //
61 
62 #ifndef EASTL_EABASE_DISABLED
63  #include <EABase/eabase.h>
64 #endif
65 #include <EABase/eahave.h>
66 
67 #if defined(EA_PRAGMA_ONCE_SUPPORTED)
68  #pragma once
69 #endif
70 
71 
73 // EASTL_VERSION
74 //
75 // We more or less follow the conventional EA packaging approach to versioning
76 // here. A primary distinction here is that minor versions are defined as two
77 // digit entities (e.g. .03") instead of minimal digit entities ".3"). The logic
78 // here is that the value is a counter and not a floating point fraction.
79 // Note that the major version doesn't have leading zeros.
80 //
81 // Example version strings:
82 // "0.91.00" // Major version 0, minor version 91, patch version 0.
83 // "1.00.00" // Major version 1, minor and patch version 0.
84 // "3.10.02" // Major version 3, minor version 10, patch version 02.
85 // "12.03.01" // Major version 12, minor version 03, patch version
86 //
87 // Example usage:
88 // printf("EASTL version: %s", EASTL_VERSION);
89 // printf("EASTL version: %d.%d.%d", EASTL_VERSION_N / 10000 % 100, EASTL_VERSION_N / 100 % 100, EASTL_VERSION_N % 100);
90 //
92 
93 #ifndef EASTL_VERSION
94  #define EASTL_VERSION "3.18.00"
95  #define EASTL_VERSION_N 31800
96 #endif
97 
98 
100 // EA_COMPILER_NO_STANDARD_CPP_LIBRARY
101 //
102 // Defined as 1 or undefined.
103 // Implements support for the definition of EA_COMPILER_NO_STANDARD_CPP_LIBRARY for the case
104 // of using EABase versions prior to the addition of its EA_COMPILER_NO_STANDARD_CPP_LIBRARY support.
105 //
106 #if !defined(EA_COMPILER_NO_STANDARD_CPP_LIBRARY)
107  #if defined(EA_PLATFORM_ANDROID)
108  // Disabled because EA's eaconfig/android_config/android_sdk packages currently
109  // don't support linking STL libraries. Perhaps we can figure out what linker arguments
110  // are needed for an app so we can manually specify them and then re-enable this code.
111  //
112  //#include <android/api-level.h>
113  //
114  //#if (__ANDROID_API__ < 9) // Earlier versions of Android provide no std C++ STL implementation.
115  #define EA_COMPILER_NO_STANDARD_CPP_LIBRARY 1
116  //#endif
117  #endif
118 #endif
119 
120 
122 // EA_NOEXCEPT
123 //
124 // Defined as a macro. Provided here for backward compatibility with older
125 // EABase versions prior to 2.00.40 that don't yet define it themselves.
126 //
127 #if !defined(EA_NOEXCEPT)
128  #define EA_NOEXCEPT
129  #define EA_NOEXCEPT_IF(predicate)
130  #define EA_NOEXCEPT_EXPR(expression) false
131 #endif
132 
133 
134 
136 // EA_CPP14_CONSTEXPR
137 //
138 // Defined as constexpr when a C++14 compiler is present. Defines it as nothing
139 // when using a C++11 compiler.
140 // C++14 relaxes the specification for constexpr such that it allows more
141 // kinds of expressions. Since a C++11 compiler doesn't allow this, we need
142 // to make a unique define for C++14 constexpr. This macro should be used only
143 // when you are using it with code that specfically requires C++14 constexpr
144 // functionality beyond the regular C++11 constexpr functionality.
145 // http://en.wikipedia.org/wiki/C%2B%2B14#Relaxed_constexpr_restrictions
146 //
147 #if !defined(EA_CPP14_CONSTEXPR)
148  #if defined(EA_COMPILER_CPP14_ENABLED)
149  #define EA_CPP14_CONSTEXPR constexpr
150  #else
151  #define EA_CPP14_CONSTEXPR // not supported
152  #define EA_NO_CPP14_CONSTEXPR
153  #endif
154 #endif
155 
156 
158 // EASTL namespace
159 //
160 // We define this so that users that #include this config file can reference
161 // these namespaces without seeing any other files that happen to use them.
163 
165 namespace eastl
166 {
167  // Intentionally empty.
168 }
169 
170 
171 
172 
174 // EASTL_DEBUG
175 //
176 // Defined as an integer >= 0. Default is 1 for debug builds and 0 for
177 // release builds. This define is also a master switch for the default value
178 // of some other settings.
179 //
180 // Example usage:
181 // #if EASTL_DEBUG
182 // ...
183 // #endif
184 //
186 
187 #ifndef EASTL_DEBUG
188  #if defined(EA_DEBUG) || defined(_DEBUG)
189  #define EASTL_DEBUG 1
190  #else
191  #define EASTL_DEBUG 0
192  #endif
193 #endif
194 
195 // Developer debug. Helps EASTL developers assert EASTL is coded correctly.
196 // Normally disabled for users since it validates internal things and not user things.
197 #ifndef EASTL_DEV_DEBUG
198  #define EASTL_DEV_DEBUG 0
199 #endif
200 
201 
203 // EASTL_DEBUGPARAMS_LEVEL
204 //
205 // EASTL_DEBUGPARAMS_LEVEL controls what debug information is passed through to
206 // the allocator by default.
207 // This value may be defined by the user ... if not it will default to 1 for
208 // EA_DEBUG builds, otherwise 0.
209 //
210 // 0 - no debug information is passed through to allocator calls.
211 // 1 - 'name' is passed through to allocator calls.
212 // 2 - 'name', __FILE__, and __LINE__ are passed through to allocator calls.
213 //
214 // This parameter mirrors the equivalent parameter in the CoreAllocator package.
215 //
217 
218 #ifndef EASTL_DEBUGPARAMS_LEVEL
219  #if EASTL_DEBUG
220  #define EASTL_DEBUGPARAMS_LEVEL 2
221  #else
222  #define EASTL_DEBUGPARAMS_LEVEL 0
223  #endif
224 #endif
225 
226 
227 
229 // EASTL_DLL
230 //
231 // Defined as 0 or 1. The default is dependent on the definition of EA_DLL.
232 // If EA_DLL is defined, then EASTL_DLL is 1, else EASTL_DLL is 0.
233 // EA_DLL is a define that controls DLL builds within the EAConfig build system.
234 // EASTL_DLL controls whether EASTL is built and used as a DLL.
235 // Normally you wouldn't do such a thing, but there are use cases for such
236 // a thing, particularly in the case of embedding C++ into C# applications.
237 //
238 #ifndef EASTL_DLL
239  #if defined(EA_DLL)
240  #define EASTL_DLL 1
241  #else
242  #define EASTL_DLL 0
243  #endif
244 #endif
245 
246 
248 // EASTL_IF_NOT_DLL
249 //
250 // Utility to include expressions only for static builds.
251 //
252 #ifndef EASTL_IF_NOT_DLL
253  #if EASTL_DLL
254  #define EASTL_IF_NOT_DLL(x)
255  #else
256  #define EASTL_IF_NOT_DLL(x) x
257  #endif
258 #endif
259 
260 
262 // EASTL_API
263 //
264 // This is used to label functions as DLL exports under Microsoft platforms.
265 // If EA_DLL is defined, then the user is building EASTL as a DLL and EASTL's
266 // non-templated functions will be exported. EASTL template functions are not
267 // labelled as EASTL_API (and are thus not exported in a DLL build). This is
268 // because it's not possible (or at least unsafe) to implement inline templated
269 // functions in a DLL.
270 //
271 // Example usage of EASTL_API:
272 // EASTL_API int someVariable = 10; // Export someVariable in a DLL build.
273 //
274 // struct EASTL_API SomeClass{ // Export SomeClass and its member functions in a DLL build.
275 // EASTL_LOCAL void PrivateMethod(); // Not exported.
276 // };
277 //
278 // EASTL_API void SomeFunction(); // Export SomeFunction in a DLL build.
279 //
280 //
281 #if defined(EA_DLL) && !defined(EASTL_DLL)
282  #define EASTL_DLL 1
283 #endif
284 
285 #ifndef EASTL_API // If the build file hasn't already defined this to be dllexport...
286  #if EASTL_DLL
287  #if defined(_MSC_VER)
288  #define EASTL_API __declspec(dllimport)
289  #define EASTL_LOCAL
290  #elif defined(__CYGWIN__)
291  #define EASTL_API __attribute__((dllimport))
292  #define EASTL_LOCAL
293  #elif (defined(__GNUC__) && (__GNUC__ >= 4))
294  #define EASTL_API __attribute__ ((visibility("default")))
295  #define EASTL_LOCAL __attribute__ ((visibility("hidden")))
296  #else
297  #define EASTL_API
298  #define EASTL_LOCAL
299  #endif
300  #else
301  #define EASTL_API
302  #define EASTL_LOCAL
303  #endif
304 #endif
305 
306 
308 // EASTL_EASTDC_API
309 //
310 // This is used for importing EAStdC functions into EASTL, possibly via a DLL import.
311 //
312 #ifndef EASTL_EASTDC_API
313  #if EASTL_DLL
314  #if defined(_MSC_VER)
315  #define EASTL_EASTDC_API __declspec(dllimport)
316  #define EASTL_EASTDC_LOCAL
317  #elif defined(__CYGWIN__)
318  #define EASTL_EASTDC_API __attribute__((dllimport))
319  #define EASTL_EASTDC_LOCAL
320  #elif (defined(__GNUC__) && (__GNUC__ >= 4))
321  #define EASTL_EASTDC_API __attribute__ ((visibility("default")))
322  #define EASTL_EASTDC_LOCAL __attribute__ ((visibility("hidden")))
323  #else
324  #define EASTL_EASTDC_API
325  #define EASTL_EASTDC_LOCAL
326  #endif
327  #else
328  #define EASTL_EASTDC_API
329  #define EASTL_EASTDC_LOCAL
330  #endif
331 #endif
332 
333 
335 // EASTL_EASTDC_VSNPRINTF
336 //
337 // Defined as 0 or 1. By default it is 1.
338 //
339 // When enabled EASTL uses EAStdC's Vsnprintf function directly instead of
340 // having the user provide a global Vsnprintf8/16/32 function. The benefit
341 // of this is that it will allow EASTL to just link to EAStdC's Vsnprintf
342 // without the user doing anything. The downside is that any users who aren't
343 // already using EAStdC will either need to now depend on EAStdC or globally
344 // define this property to be 0 and simply provide functions that have the same
345 // names. See the usage of EASTL_EASTDC_VSNPRINTF in string.h for more info.
346 //
347 #if !defined(EASTL_EASTDC_VSNPRINTF)
348  #define EASTL_EASTDC_VSNPRINTF 1
349 #endif
350 
351 
352 
354 // EASTL_NAME_ENABLED / EASTL_NAME / EASTL_NAME_VAL
355 //
356 // Used to wrap debug string names. In a release build, the definition
357 // goes away. These are present to avoid release build compiler warnings
358 // and to make code simpler.
359 //
360 // Example usage of EASTL_NAME:
361 // // pName will defined away in a release build and thus prevent compiler warnings.
362 // void allocator::set_name(const char* EASTL_NAME(pName))
363 // {
364 // #if EASTL_NAME_ENABLED
365 // mpName = pName;
366 // #endif
367 // }
368 //
369 // Example usage of EASTL_NAME_VAL:
370 // // "xxx" is defined to NULL in a release build.
371 // vector<T, Allocator>::vector(const allocator_type& allocator = allocator_type(EASTL_NAME_VAL("xxx")));
372 //
374 
375 #ifndef EASTL_NAME_ENABLED
376  #define EASTL_NAME_ENABLED EASTL_DEBUG
377 #endif
378 
379 #ifndef EASTL_NAME
380  #if EASTL_NAME_ENABLED
381  #define EASTL_NAME(x) x
382  #define EASTL_NAME_VAL(x) x
383  #else
384  #define EASTL_NAME(x)
385  #define EASTL_NAME_VAL(x) ((const char*)NULL)
386  #endif
387 #endif
388 
389 
390 
392 // EASTL_DEFAULT_NAME_PREFIX
393 //
394 // Defined as a string literal. Defaults to "EASTL".
395 // This define is used as the default name for EASTL where such a thing is
396 // referenced in EASTL. For example, if the user doesn't specify an allocator
397 // name for their deque, it is named "EASTL deque". However, you can override
398 // this to say "SuperBaseball deque" by changing EASTL_DEFAULT_NAME_PREFIX.
399 //
400 // Example usage (which is simply taken from how deque.h uses this define):
401 // #ifndef EASTL_DEQUE_DEFAULT_NAME
402 // #define EASTL_DEQUE_DEFAULT_NAME EASTL_DEFAULT_NAME_PREFIX " deque"
403 // #endif
404 //
405 #ifndef EASTL_DEFAULT_NAME_PREFIX
406  #define EASTL_DEFAULT_NAME_PREFIX "EASTL"
407 #endif
408 
409 
410 
412 // EASTL_ASSERT_ENABLED
413 //
414 // Defined as 0 or non-zero. Default is same as EASTL_DEBUG.
415 // If EASTL_ASSERT_ENABLED is non-zero, then asserts will be executed via
416 // the assertion mechanism.
417 //
418 // Example usage:
419 // #if EASTL_ASSERT_ENABLED
420 // EASTL_ASSERT(v.size() > 17);
421 // #endif
422 //
424 
425 #ifndef EASTL_ASSERT_ENABLED
426  #define EASTL_ASSERT_ENABLED EASTL_DEBUG
427 #endif
428 
429 // Developer assert. Helps EASTL developers assert EASTL is coded correctly.
430 // Normally disabled for users since it validates internal things and not user things.
431 #ifndef EASTL_DEV_ASSERT_ENABLED
432  #define EASTL_DEV_ASSERT_ENABLED EASTL_DEV_DEBUG
433 #endif
434 
435 
436 
438 // EASTL_EMPTY_REFERENCE_ASSERT_ENABLED
439 //
440 // Defined as 0 or non-zero. Default is same as EASTL_ASSERT_ENABLED.
441 // This is like EASTL_ASSERT_ENABLED, except it is for empty container
442 // references. Sometime people like to be able to take a reference to
443 // the front of the container, but not use it if the container is empty.
444 // In practice it's often easier and more efficient to do this than to write
445 // extra code to check if the container is empty.
446 //
447 // NOTE: If this is enabled, EASTL_ASSERT_ENABLED must also be enabled
448 //
449 // Example usage:
450 // template <typename T, typename Allocator>
451 // inline typename vector<T, Allocator>::reference
452 // vector<T, Allocator>::front()
453 // {
454 // #if EASTL_ASSERT_ENABLED
455 // EASTL_ASSERT(mpEnd > mpBegin);
456 // #endif
457 //
458 // return *mpBegin;
459 // }
460 //
462 
463 #ifndef EASTL_EMPTY_REFERENCE_ASSERT_ENABLED
464  #define EASTL_EMPTY_REFERENCE_ASSERT_ENABLED EASTL_ASSERT_ENABLED
465 #endif
466 
467 
468 
470 // SetAssertionFailureFunction
471 //
472 // Allows the user to set a custom assertion failure mechanism.
473 //
474 // Example usage:
475 // void Assert(const char* pExpression, void* pContext);
476 // SetAssertionFailureFunction(Assert, this);
477 //
479 
480 #ifndef EASTL_ASSERTION_FAILURE_DEFINED
481  #define EASTL_ASSERTION_FAILURE_DEFINED
482 
483  namespace eastl
484  {
485  typedef void (*EASTL_AssertionFailureFunction)(const char* pExpression, void* pContext);
486  EASTL_API void SetAssertionFailureFunction(EASTL_AssertionFailureFunction pFunction, void* pContext);
487 
488  // These are the internal default functions that implement asserts.
489  EASTL_API void AssertionFailure(const char* pExpression);
490  EASTL_API void AssertionFailureFunctionDefault(const char* pExpression, void* pContext);
491  }
492 #endif
493 
494 
495 
497 // EASTL_ASSERT
498 //
499 // Assertion macro. Can be overridden by user with a different value.
500 //
501 // Example usage:
502 // EASTL_ASSERT(intVector.size() < 100);
503 //
505 
506 #ifndef EASTL_ASSERT
507  #if EASTL_ASSERT_ENABLED
508  #define EASTL_ASSERT(expression) \
509  EA_DISABLE_VC_WARNING(4127) \
510  do { \
511  EA_ANALYSIS_ASSUME(expression); \
512  (void)((expression) || (eastl::AssertionFailure(#expression), 0)); \
513  } while (0) \
514  EA_RESTORE_VC_WARNING()
515  #else
516  #define EASTL_ASSERT(expression)
517  #endif
518 #endif
519 
520 // Developer assert. Helps EASTL developers assert EASTL is coded correctly.
521 // Normally disabled for users since it validates internal things and not user things.
522 #ifndef EASTL_DEV_ASSERT
523  #if EASTL_DEV_ASSERT_ENABLED
524  #define EASTL_DEV_ASSERT(expression) \
525  EA_DISABLE_VC_WARNING(4127) \
526  do { \
527  EA_ANALYSIS_ASSUME(expression); \
528  (void)((expression) || (eastl::AssertionFailure(#expression), 0)); \
529  } while(0) \
530  EA_RESTORE_VC_WARNING()
531  #else
532  #define EASTL_DEV_ASSERT(expression)
533  #endif
534 #endif
535 
536 
537 
539 // EASTL_ASSERT_MSG
540 //
541 // Example usage:
542 // EASTL_ASSERT_MSG(false, "detected error condition!");
543 //
545 #ifndef EASTL_ASSERT_MSG
546  #if EASTL_ASSERT_ENABLED
547  #define EASTL_ASSERT_MSG(expression, message) \
548  EA_DISABLE_VC_WARNING(4127) \
549  do { \
550  EA_ANALYSIS_ASSUME(expression); \
551  (void)((expression) || (eastl::AssertionFailure(message), 0)); \
552  } while (0) \
553  EA_RESTORE_VC_WARNING()
554  #else
555  #define EASTL_ASSERT_MSG(expression, message)
556  #endif
557 #endif
558 
559 
560 
562 // EASTL_FAIL_MSG
563 //
564 // Failure macro. Can be overridden by user with a different value.
565 //
566 // Example usage:
567 // EASTL_FAIL("detected error condition!");
568 //
570 
571 #ifndef EASTL_FAIL_MSG
572  #if EASTL_ASSERT_ENABLED
573  #define EASTL_FAIL_MSG(message) (eastl::AssertionFailure(message))
574  #else
575  #define EASTL_FAIL_MSG(message)
576  #endif
577 #endif
578 
579 
580 
582 // EASTL_CT_ASSERT / EASTL_CT_ASSERT_NAMED
583 //
584 // EASTL_CT_ASSERT is a macro for compile time assertion checks, useful for
585 // validating *constant* expressions. The advantage over using EASTL_ASSERT
586 // is that errors are caught at compile time instead of runtime.
587 //
588 // Example usage:
589 // EASTL_CT_ASSERT(sizeof(uint32_t) == 4);
590 //
592 
593 #define EASTL_CT_ASSERT(expression) static_assert(expression, #expression)
594 
595 
596 
598 // EASTL_CT_ASSERT_MSG
599 //
600 // EASTL_CT_ASSERT_MSG is a macro for compile time assertion checks, useful for
601 // validating *constant* expressions. The advantage over using EASTL_ASSERT
602 // is that errors are caught at compile time instead of runtime.
603 // The message must be a string literal.
604 //
605 // Example usage:
606 // EASTL_CT_ASSERT_MSG(sizeof(uint32_t) == 4, "The size of uint32_t must be 4.");
607 //
609 
610 #define EASTL_CT_ASSERT_MSG(expression, message) static_assert(expression, message)
611 
612 
613 
615 // EASTL_DEBUG_BREAK / EASTL_DEBUG_BREAK_OVERRIDE
616 //
617 // This function causes an app to immediately stop under the debugger.
618 // It is implemented as a macro in order to allow stopping at the site
619 // of the call.
620 //
621 // EASTL_DEBUG_BREAK_OVERRIDE allows one to define EASTL_DEBUG_BREAK directly.
622 // This is useful in cases where you desire to disable EASTL_DEBUG_BREAK
623 // but do not wish to (or cannot) define a custom void function() to replace
624 // EASTL_DEBUG_BREAK callsites.
625 //
626 // Example usage:
627 // EASTL_DEBUG_BREAK();
628 //
630 
631 #ifndef EASTL_DEBUG_BREAK_OVERRIDE
632  #ifndef EASTL_DEBUG_BREAK
633  #if defined(_MSC_VER) && (_MSC_VER >= 1300)
634  #define EASTL_DEBUG_BREAK() __debugbreak() // This is a compiler intrinsic which will map to appropriate inlined asm for the platform.
635  #elif (defined(EA_PROCESSOR_ARM) && !defined(EA_PROCESSOR_ARM64)) && defined(__APPLE__)
636  #define EASTL_DEBUG_BREAK() asm("trap")
637  #elif defined(EA_PROCESSOR_ARM64) && defined(__APPLE__)
638  #include <signal.h>
639  #include <unistd.h>
640  #define EASTL_DEBUG_BREAK() kill( getpid(), SIGINT )
641  #elif defined(EA_PROCESSOR_ARM64) && defined(__GNUC__)
642  #define EASTL_DEBUG_BREAK() asm("brk 10")
643  #elif defined(EA_PROCESSOR_ARM) && defined(__GNUC__)
644  #define EASTL_DEBUG_BREAK() asm("BKPT 10") // The 10 is arbitrary. It's just a unique id.
645  #elif defined(EA_PROCESSOR_ARM) && defined(__ARMCC_VERSION)
646  #define EASTL_DEBUG_BREAK() __breakpoint(10)
647  #elif defined(EA_PROCESSOR_POWERPC) // Generic PowerPC.
648  #define EASTL_DEBUG_BREAK() asm(".long 0") // This triggers an exception by executing opcode 0x00000000.
649  #elif (defined(EA_PROCESSOR_X86) || defined(EA_PROCESSOR_X86_64)) && defined(EA_ASM_STYLE_INTEL)
650  #define EASTL_DEBUG_BREAK() { __asm int 3 }
651  #elif (defined(EA_PROCESSOR_X86) || defined(EA_PROCESSOR_X86_64)) && (defined(EA_ASM_STYLE_ATT) || defined(__GNUC__))
652  #define EASTL_DEBUG_BREAK() asm("int3")
653  #else
654  void EASTL_DEBUG_BREAK(); // User must define this externally.
655  #endif
656  #else
657  void EASTL_DEBUG_BREAK(); // User must define this externally.
658  #endif
659 #else
660  #ifndef EASTL_DEBUG_BREAK
661  #if EASTL_DEBUG_BREAK_OVERRIDE == 1
662  // define an empty callable to satisfy the call site.
663  #define EASTL_DEBUG_BREAK ([]{})
664  #else
665  #define EASTL_DEBUG_BREAK EASTL_DEBUG_BREAK_OVERRIDE
666  #endif
667  #else
668  #error EASTL_DEBUG_BREAK is already defined yet you would like to override it. Please ensure no other headers are already defining EASTL_DEBUG_BREAK before this header (config.h) is included
669  #endif
670 #endif
671 
672 
673 
675 // EASTL_ALLOCATOR_COPY_ENABLED
676 //
677 // Defined as 0 or 1. Default is 0 (disabled) until some future date.
678 // If enabled (1) then container operator= copies the allocator from the
679 // source container. It ideally should be set to enabled but for backwards
680 // compatibility with older versions of EASTL it is currently set to 0.
681 // Regardless of whether this value is 0 or 1, this container copy constructs
682 // or copy assigns allocators.
683 //
685 
686 #ifndef EASTL_ALLOCATOR_COPY_ENABLED
687  #define EASTL_ALLOCATOR_COPY_ENABLED 0
688 #endif
689 
690 
691 
693 // EASTL_FIXED_SIZE_TRACKING_ENABLED
694 //
695 // Defined as an integer >= 0. Default is same as EASTL_DEBUG.
696 // If EASTL_FIXED_SIZE_TRACKING_ENABLED is enabled, then fixed
697 // containers in debug builds track the max count of objects
698 // that have been in the container. This allows for the tuning
699 // of fixed container sizes to their minimum required size.
700 //
702 
703 #ifndef EASTL_FIXED_SIZE_TRACKING_ENABLED
704  #define EASTL_FIXED_SIZE_TRACKING_ENABLED EASTL_DEBUG
705 #endif
706 
707 
708 
710 // EASTL_RTTI_ENABLED
711 //
712 // Defined as 0 or 1. Default is 1 if RTTI is supported by the compiler.
713 // This define exists so that we can use some dynamic_cast operations in the
714 // code without warning. dynamic_cast is only used if the specifically refers
715 // to it; EASTL won't do dynamic_cast behind your back.
716 //
717 // Example usage:
718 // #if EASTL_RTTI_ENABLED
719 // pChildClass = dynamic_cast<ChildClass*>(pParentClass);
720 // #endif
721 //
723 
724 #ifndef EASTL_RTTI_ENABLED
725  // The VC++ default Standard Library (Dinkumware) disables major parts of RTTI
726  // (e.g. type_info) if exceptions are disabled, even if RTTI itself is enabled.
727  // _HAS_EXCEPTIONS is defined by Dinkumware to 0 or 1 (disabled or enabled).
728  #if defined(EA_COMPILER_NO_RTTI) || (defined(_MSC_VER) && defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && !(defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS))
729  #define EASTL_RTTI_ENABLED 0
730  #else
731  #define EASTL_RTTI_ENABLED 1
732  #endif
733 #endif
734 
735 
736 
737 
739 // EASTL_EXCEPTIONS_ENABLED
740 //
741 // Defined as 0 or 1. Default is to follow what the compiler settings are.
742 // The user can predefine EASTL_EXCEPTIONS_ENABLED to 0 or 1; however, if the
743 // compiler is set to disable exceptions then EASTL_EXCEPTIONS_ENABLED is
744 // forced to a value of 0 regardless of the user predefine.
745 //
746 // Note that we do not enable EASTL exceptions by default if the compiler
747 // has exceptions enabled. To enable EASTL_EXCEPTIONS_ENABLED you need to
748 // manually set it to 1.
749 //
751 
752 #if !defined(EASTL_EXCEPTIONS_ENABLED) || ((EASTL_EXCEPTIONS_ENABLED == 1) && defined(EA_COMPILER_NO_EXCEPTIONS))
753  #define EASTL_EXCEPTIONS_ENABLED 0
754 #endif
755 
756 
757 
758 
759 
761 // EASTL_STRING_OPT_XXXX
762 //
763 // Enables some options / optimizations options that cause the string class
764 // to behave slightly different from the C++ standard basic_string. These are
765 // options whereby you can improve performance by avoiding operations that
766 // in practice may never occur for you.
767 //
769 
770 #ifndef EASTL_STRING_OPT_EXPLICIT_CTORS
771  // Defined as 0 or 1. Default is 0.
772  // Defines if we should implement explicity in constructors where the C++
773  // standard string does not. The advantage of enabling explicit constructors
774  // is that you can do this: string s = "hello"; in addition to string s("hello");
775  // The disadvantage of enabling explicity constructors is that there can be
776  // silent conversions done which impede performance if the user isn't paying
777  // attention.
778  // C++ standard string ctors are not explicit.
779  #define EASTL_STRING_OPT_EXPLICIT_CTORS 0
780 #endif
781 
782 #ifndef EASTL_STRING_OPT_LENGTH_ERRORS
783  // Defined as 0 or 1. Default is equal to EASTL_EXCEPTIONS_ENABLED.
784  // Defines if we check for string values going beyond kMaxSize
785  // (a very large value) and throw exections if so.
786  // C++ standard strings are expected to do such checks.
787  #define EASTL_STRING_OPT_LENGTH_ERRORS EASTL_EXCEPTIONS_ENABLED
788 #endif
789 
790 #ifndef EASTL_STRING_OPT_RANGE_ERRORS
791  // Defined as 0 or 1. Default is equal to EASTL_EXCEPTIONS_ENABLED.
792  // Defines if we check for out-of-bounds references to string
793  // positions and throw exceptions if so. Well-behaved code shouldn't
794  // refence out-of-bounds positions and so shouldn't need these checks.
795  // C++ standard strings are expected to do such range checks.
796  #define EASTL_STRING_OPT_RANGE_ERRORS EASTL_EXCEPTIONS_ENABLED
797 #endif
798 
799 #ifndef EASTL_STRING_OPT_ARGUMENT_ERRORS
800  // Defined as 0 or 1. Default is 0.
801  // Defines if we check for NULL ptr arguments passed to string
802  // functions by the user and throw exceptions if so. Well-behaved code
803  // shouldn't pass bad arguments and so shouldn't need these checks.
804  // Also, some users believe that strings should check for NULL pointers
805  // in all their arguments and do no-ops if so. This is very debatable.
806  // C++ standard strings are not required to check for such argument errors.
807  #define EASTL_STRING_OPT_ARGUMENT_ERRORS 0
808 #endif
809 
810 
811 
813 // EASTL_BITSET_SIZE_T
814 //
815 // Defined as 0 or 1. Default is 1.
816 // Controls whether bitset uses size_t or eastl_size_t.
817 //
818 #ifndef EASTL_BITSET_SIZE_T
819  #define EASTL_BITSET_SIZE_T 1
820 #endif
821 
822 
823 
825 // EASTL_INT128_SUPPORTED
826 //
827 // Defined as 0 or 1.
828 //
829 #ifndef EASTL_INT128_SUPPORTED
830  #if defined(__SIZEOF_INT128__) || (defined(EA_COMPILER_INTMAX_SIZE) && (EA_COMPILER_INTMAX_SIZE >= 16))
831  #define EASTL_INT128_SUPPORTED 1
832  #else
833  #define EASTL_INT128_SUPPORTED 0
834  #endif
835 #endif
836 
837 
838 
840 // EASTL_DEFAULT_ALLOCATOR_ALIGNED_ALLOCATIONS_SUPPORTED
841 //
842 // Defined as 0 or 1.
843 // Tells if you can use the default EASTL allocator to do aligned allocations,
844 // which for most uses tells if you can store aligned objects in containers
845 // that use default allocators. It turns out that when built as a DLL for
846 // some platforms, EASTL doesn't have a way to do aligned allocations, as it
847 // doesn't have a heap that supports it. There is a way to work around this
848 // with dynamically defined allocators, but that's currently a to-do.
849 //
850 #ifndef EASTL_DEFAULT_ALLOCATOR_ALIGNED_ALLOCATIONS_SUPPORTED
851  #if EASTL_DLL
852  #define EASTL_DEFAULT_ALLOCATOR_ALIGNED_ALLOCATIONS_SUPPORTED 0
853  #else
854  #define EASTL_DEFAULT_ALLOCATOR_ALIGNED_ALLOCATIONS_SUPPORTED 1
855  #endif
856 #endif
857 
858 
860 // EASTL_INT128_DEFINED
861 //
862 // Defined as 0 or 1.
863 // Specifies whether eastl_int128_t/eastl_uint128_t have been typedef'd yet.
864 //
865 #ifndef EASTL_INT128_DEFINED
866  #if EASTL_INT128_SUPPORTED
867  #define EASTL_INT128_DEFINED 1
868 
869  #if defined(__SIZEOF_INT128__) || defined(EA_COMPILER_GNUC) || defined(__clang__)
870  typedef __int128_t eastl_int128_t;
871  typedef __uint128_t eastl_uint128_t;
872  #else
873  typedef int128_t eastl_int128_t; // The EAStdC package defines an EA::StdC::int128_t and uint128_t type,
874  typedef uint128_t eastl_uint128_t; // though they are currently within the EA::StdC namespace.
875  #endif
876  #endif
877 #endif
878 
879 
880 
882 // EASTL_BITSET_WORD_TYPE_DEFAULT / EASTL_BITSET_WORD_SIZE_DEFAULT
883 //
884 // Defined as an integral power of two type, usually uint32_t or uint64_t.
885 // Specifies the word type that bitset should use internally to implement
886 // storage. By default this is the platform register word size, but there
887 // may be reasons to use a different value.
888 //
889 // Defines the integral data type used by bitset by default.
890 // You can override this default on a bitset-by-bitset case by supplying a
891 // custom bitset WordType template parameter.
892 //
893 // The C++ standard specifies that the std::bitset word type be unsigned long,
894 // but that isn't necessarily the most efficient data type for the given platform.
895 // We can follow the standard and be potentially less efficient or we can do what
896 // is more efficient but less like the C++ std::bitset.
897 //
898 #if !defined(EASTL_BITSET_WORD_TYPE_DEFAULT)
899  #if defined(EASTL_BITSET_WORD_SIZE) // EASTL_BITSET_WORD_SIZE is deprecated, but we temporarily support the ability for the user to specify it. Use EASTL_BITSET_WORD_TYPE_DEFAULT instead.
900  #if (EASTL_BITSET_WORD_SIZE == 4)
901  #define EASTL_BITSET_WORD_TYPE_DEFAULT uint32_t
902  #define EASTL_BITSET_WORD_SIZE_DEFAULT 4
903  #else
904  #define EASTL_BITSET_WORD_TYPE_DEFAULT uint64_t
905  #define EASTL_BITSET_WORD_SIZE_DEFAULT 8
906  #endif
907  #elif (EA_PLATFORM_WORD_SIZE == 16) // EA_PLATFORM_WORD_SIZE is defined in EABase.
908  #define EASTL_BITSET_WORD_TYPE_DEFAULT uint128_t
909  #define EASTL_BITSET_WORD_SIZE_DEFAULT 16
910  #elif (EA_PLATFORM_WORD_SIZE == 8)
911  #define EASTL_BITSET_WORD_TYPE_DEFAULT uint64_t
912  #define EASTL_BITSET_WORD_SIZE_DEFAULT 8
913  #elif (EA_PLATFORM_WORD_SIZE == 4)
914  #define EASTL_BITSET_WORD_TYPE_DEFAULT uint32_t
915  #define EASTL_BITSET_WORD_SIZE_DEFAULT 4
916  #else
917  #define EASTL_BITSET_WORD_TYPE_DEFAULT uint16_t
918  #define EASTL_BITSET_WORD_SIZE_DEFAULT 2
919  #endif
920 #endif
921 
922 
923 
924 
926 // EASTL_LIST_SIZE_CACHE
927 //
928 // Defined as 0 or 1. Default is 1. Changed from 0 in version 1.16.01.
929 // If defined as 1, the list and slist containers (and possibly any additional
930 // containers as well) keep a member mSize (or similar) variable which allows
931 // the size() member function to execute in constant time (a.k.a. O(1)).
932 // There are debates on both sides as to whether it is better to have this
933 // cached value or not, as having it entails some cost (memory and code).
934 // To consider: Make list size caching an optional template parameter.
935 //
937 
938 #ifndef EASTL_LIST_SIZE_CACHE
939  #define EASTL_LIST_SIZE_CACHE 1
940 #endif
941 
942 #ifndef EASTL_SLIST_SIZE_CACHE
943  #define EASTL_SLIST_SIZE_CACHE 1
944 #endif
945 
946 
947 
949 // EASTL_MAX_STACK_USAGE
950 //
951 // Defined as an integer greater than zero. Default is 4000.
952 // There are some places in EASTL where temporary objects are put on the
953 // stack. A common example of this is in the implementation of container
954 // swap functions whereby a temporary copy of the container is made.
955 // There is a problem, however, if the size of the item created on the stack
956 // is very large. This can happen with fixed-size containers, for example.
957 // The EASTL_MAX_STACK_USAGE define specifies the maximum amount of memory
958 // (in bytes) that the given platform/compiler will safely allow on the stack.
959 // Platforms such as Windows will generally allow larger values than embedded
960 // systems or console machines, but it is usually a good idea to stick with
961 // a max usage value that is portable across all platforms, lest the user be
962 // surprised when something breaks as it is ported to another platform.
963 //
965 
966 #ifndef EASTL_MAX_STACK_USAGE
967  #define EASTL_MAX_STACK_USAGE 4000
968 #endif
969 
970 
971 
973 // EASTL_VA_COPY_ENABLED
974 //
975 // Defined as 0 or 1. Default is 1 for compilers that need it, 0 for others.
976 // Some compilers on some platforms implement va_list whereby its contents
977 // are destroyed upon usage, even if passed by value to another function.
978 // With these compilers you can use va_copy to save and restore a va_list.
979 // Known compiler/platforms that destroy va_list contents upon usage include:
980 // CodeWarrior on PowerPC
981 // GCC on x86-64
982 // However, va_copy is part of the C99 standard and not part of earlier C and
983 // C++ standards. So not all compilers support it. VC++ doesn't support va_copy,
984 // but it turns out that VC++ doesn't usually need it on the platforms it supports,
985 // and va_copy can usually be implemented via memcpy(va_list, va_list) with VC++.
986 //
987 // Example usage:
988 // void Function(va_list arguments)
989 // {
990 // #if EASTL_VA_COPY_ENABLED
991 // va_list argumentsCopy;
992 // va_copy(argumentsCopy, arguments);
993 // #endif
994 // <use arguments or argumentsCopy>
995 // #if EASTL_VA_COPY_ENABLED
996 // va_end(argumentsCopy);
997 // #endif
998 // }
1000 
1001 #ifndef EASTL_VA_COPY_ENABLED
1002  #if ((defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__clang__)) && (!defined(__i386__) || defined(__x86_64__)) && !defined(__ppc__) && !defined(__PPC__) && !defined(__PPC64__)
1003  #define EASTL_VA_COPY_ENABLED 1
1004  #else
1005  #define EASTL_VA_COPY_ENABLED 0
1006  #endif
1007 #endif
1008 
1009 
1011 // EASTL_OPERATOR_EQUALS_OTHER_ENABLED
1012 //
1013 // Defined as 0 or 1. Default is 0 until such day that it's deemed safe.
1014 // When enabled, enables operator= for other char types, e.g. for code
1015 // like this:
1016 // eastl::string8 s8;
1017 // eastl::string16 s16;
1018 // s8 = s16;
1019 // This option is considered experimental, and may exist as such for an
1020 // indefinite amount of time.
1021 //
1022 #if !defined(EASTL_OPERATOR_EQUALS_OTHER_ENABLED)
1023  #define EASTL_OPERATOR_EQUALS_OTHER_ENABLED 0
1024 #endif
1026 
1027 
1029 // EASTL_LIST_PROXY_ENABLED
1030 //
1031 #if !defined(EASTL_LIST_PROXY_ENABLED)
1032  // GCC with -fstrict-aliasing has bugs (or undocumented functionality in their
1033  // __may_alias__ implementation. The compiler gets confused about function signatures.
1034  // VC8 (1400) doesn't need the proxy because it has built-in smart debugging capabilities.
1035  #if defined(EASTL_DEBUG) && !defined(__GNUC__) && (!defined(_MSC_VER) || (_MSC_VER < 1400))
1036  #define EASTL_LIST_PROXY_ENABLED 1
1037  #define EASTL_LIST_PROXY_MAY_ALIAS EASTL_MAY_ALIAS
1038  #else
1039  #define EASTL_LIST_PROXY_ENABLED 0
1040  #define EASTL_LIST_PROXY_MAY_ALIAS
1041  #endif
1042 #endif
1043 
1044 
1045 
1047 // EASTL_STD_ITERATOR_CATEGORY_ENABLED
1048 //
1049 // Defined as 0 or 1. Default is 0.
1050 // If defined as non-zero, EASTL iterator categories (iterator.h's input_iterator_tag,
1051 // forward_iterator_tag, etc.) are defined to be those from std C++ in the std
1052 // namespace. The reason for wanting to enable such a feature is that it allows
1053 // EASTL containers and algorithms to work with std STL containes and algorithms.
1054 // The default value was changed from 1 to 0 in EASL 1.13.03, January 11, 2012.
1055 // The reason for the change was that almost nobody was taking advantage of it and
1056 // it was slowing down compile times for some compilers quite a bit due to them
1057 // having a lot of headers behind <iterator>.
1059 
1060 #ifndef EASTL_STD_ITERATOR_CATEGORY_ENABLED
1061  #define EASTL_STD_ITERATOR_CATEGORY_ENABLED 0
1062 #endif
1063 
1064 #if EASTL_STD_ITERATOR_CATEGORY_ENABLED
1065  #define EASTL_ITC_NS std
1066 #else
1067  #define EASTL_ITC_NS eastl
1068 #endif
1069 
1070 
1071 
1073 // EASTL_VALIDATION_ENABLED
1074 //
1075 // Defined as an integer >= 0. Default is to be equal to EASTL_DEBUG.
1076 // If nonzero, then a certain amount of automatic runtime validation is done.
1077 // Runtime validation is not considered the same thing as asserting that user
1078 // input values are valid. Validation refers to internal consistency checking
1079 // of the validity of containers and their iterators. Validation checking is
1080 // something that often involves significantly more than basic assertion
1081 // checking, and it may sometimes be desirable to disable it.
1082 // This macro would generally be used internally by EASTL.
1083 //
1085 
1086 #ifndef EASTL_VALIDATION_ENABLED
1087  #define EASTL_VALIDATION_ENABLED EASTL_DEBUG
1088 #endif
1089 
1090 
1091 
1093 // EASTL_VALIDATE_COMPARE
1094 //
1095 // Defined as EASTL_ASSERT or defined away. Default is EASTL_ASSERT if EASTL_VALIDATION_ENABLED is enabled.
1096 // This is used to validate user-supplied comparison functions, particularly for sorting purposes.
1097 //
1099 
1100 #ifndef EASTL_VALIDATE_COMPARE_ENABLED
1101  #define EASTL_VALIDATE_COMPARE_ENABLED EASTL_VALIDATION_ENABLED
1102 #endif
1103 
1104 #if EASTL_VALIDATE_COMPARE_ENABLED
1105  #define EASTL_VALIDATE_COMPARE EASTL_ASSERT
1106 #else
1107  #define EASTL_VALIDATE_COMPARE(expression)
1108 #endif
1109 
1110 
1111 
1113 // EASTL_VALIDATE_INTRUSIVE_LIST
1114 //
1115 // Defined as an integral value >= 0. Controls the amount of automatic validation
1116 // done by intrusive_list. A value of 0 means no automatic validation is done.
1117 // As of this writing, EASTL_VALIDATE_INTRUSIVE_LIST defaults to 0, as it makes
1118 // the intrusive_list_node become a non-POD, which may be an issue for some code.
1119 //
1121 
1122 #ifndef EASTL_VALIDATE_INTRUSIVE_LIST
1123  #define EASTL_VALIDATE_INTRUSIVE_LIST 0
1124 #endif
1125 
1126 
1127 
1129 // EASTL_FORCE_INLINE
1130 //
1131 // Defined as a "force inline" expression or defined away.
1132 // You generally don't need to use forced inlining with the Microsoft and
1133 // Metrowerks compilers, but you may need it with the GCC compiler (any version).
1134 //
1135 // Example usage:
1136 // template <typename T, typename Allocator>
1137 // EASTL_FORCE_INLINE typename vector<T, Allocator>::size_type
1138 // vector<T, Allocator>::size() const
1139 // { return mpEnd - mpBegin; }
1140 //
1142 
1143 #ifndef EASTL_FORCE_INLINE
1144  #define EASTL_FORCE_INLINE EA_FORCE_INLINE
1145 #endif
1146 
1147 
1148 
1150 // EASTL_MAY_ALIAS
1151 //
1152 // Defined as a macro that wraps the GCC may_alias attribute. This attribute
1153 // has no significance for VC++ because VC++ doesn't support the concept of
1154 // strict aliasing. Users should avoid writing code that breaks strict
1155 // aliasing rules; EASTL_MAY_ALIAS is for cases with no alternative.
1156 //
1157 // Example usage:
1158 // uint32_t value EASTL_MAY_ALIAS;
1159 //
1160 // Example usage:
1161 // typedef uint32_t EASTL_MAY_ALIAS value_type;
1162 // value_type value;
1163 //
1164 #if defined(__GNUC__) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 303) && !defined(EA_COMPILER_RVCT)
1165  #define EASTL_MAY_ALIAS __attribute__((__may_alias__))
1166 #else
1167  #define EASTL_MAY_ALIAS
1168 #endif
1169 
1170 
1171 
1173 // EASTL_LIKELY / EASTL_UNLIKELY
1174 //
1175 // Defined as a macro which gives a hint to the compiler for branch
1176 // prediction. GCC gives you the ability to manually give a hint to
1177 // the compiler about the result of a comparison, though it's often
1178 // best to compile shipping code with profiling feedback under both
1179 // GCC (-fprofile-arcs) and VC++ (/LTCG:PGO, etc.). However, there
1180 // are times when you feel very sure that a boolean expression will
1181 // usually evaluate to either true or false and can help the compiler
1182 // by using an explicity directive...
1183 //
1184 // Example usage:
1185 // if(EASTL_LIKELY(a == 0)) // Tell the compiler that a will usually equal 0.
1186 // { ... }
1187 //
1188 // Example usage:
1189 // if(EASTL_UNLIKELY(a == 0)) // Tell the compiler that a will usually not equal 0.
1190 // { ... }
1191 //
1193 
1194 #ifndef EASTL_LIKELY
1195  #if defined(__GNUC__) && (__GNUC__ >= 3)
1196  #define EASTL_LIKELY(x) __builtin_expect(!!(x), true)
1197  #define EASTL_UNLIKELY(x) __builtin_expect(!!(x), false)
1198  #else
1199  #define EASTL_LIKELY(x) (x)
1200  #define EASTL_UNLIKELY(x) (x)
1201  #endif
1202 #endif
1203 
1204 
1206 // EASTL_STD_TYPE_TRAITS_AVAILABLE
1207 //
1208 // Defined as 0 or 1; default is based on auto-detection.
1209 // Specifies whether Standard C++11 <type_traits> support exists.
1210 // Sometimes the auto-detection below fails to work properly and the
1211 // user needs to override it. Does not define whether the compiler provides
1212 // built-in compiler type trait support (e.g. __is_abstract()), as some
1213 // compilers will EASTL_STD_TYPE_TRAITS_AVAILABLE = 0, but have built
1214 // in type trait support.
1215 //
1216 #ifndef EASTL_STD_TYPE_TRAITS_AVAILABLE
1217  /* Disabled because we don't currently need it.
1218  #if defined(_MSC_VER) && (_MSC_VER >= 1500) // VS2008 or later
1219  #pragma warning(push, 0)
1220  #include <yvals.h>
1221  #pragma warning(pop)
1222  #if ((defined(_HAS_TR1) && _HAS_TR1) || _MSC_VER >= 1700) // VS2012 (1700) and later has built-in type traits support.
1223  #define EASTL_STD_TYPE_TRAITS_AVAILABLE 1
1224  #include <type_traits>
1225  #else
1226  #define EASTL_STD_TYPE_TRAITS_AVAILABLE 0
1227  #endif
1228 
1229  #elif defined(EA_COMPILER_CLANG) || (defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4003) && !defined(__GCCXML__)) && !defined(EA_COMPILER_NO_STANDARD_CPP_LIBRARY)
1230  #include <cstddef> // This will define __GLIBCXX__ if using GNU's libstdc++ and _LIBCPP_VERSION if using clang's libc++.
1231 
1232  #if defined(EA_COMPILER_CLANG) && !defined(EA_PLATFORM_APPLE) // As of v3.0.0, Apple's clang doesn't support type traits.
1233  // http://clang.llvm.org/docs/LanguageExtensions.html#checking_type_traits
1234  // Clang has some built-in compiler trait support. This support doesn't currently
1235  // directly cover all our type_traits, though the C++ Standard Library that's used
1236  // with clang could fill that in.
1237  #define EASTL_STD_TYPE_TRAITS_AVAILABLE 1
1238  #endif
1239 
1240  #if !defined(EASTL_STD_TYPE_TRAITS_AVAILABLE)
1241  #if defined(_LIBCPP_VERSION) // This is defined by clang's libc++.
1242  #include <type_traits>
1243 
1244  #elif defined(__GLIBCXX__) && (__GLIBCXX__ >= 20090124) // It's not clear if this is the oldest version that has type traits; probably it isn't.
1245  #define EASTL_STD_TYPE_TRAITS_AVAILABLE 1
1246 
1247  #if defined(__GXX_EXPERIMENTAL_CXX0X__) // To do: Update this test to include conforming C++11 implementations.
1248  #include <type_traits>
1249  #else
1250  #include <tr1/type_traits>
1251  #endif
1252  #else
1253  #define EASTL_STD_TYPE_TRAITS_AVAILABLE 0
1254  #endif
1255  #endif
1256 
1257  #elif defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) // CodeWarrior compiler.
1258  #define EASTL_STD_TYPE_TRAITS_AVAILABLE 0
1259  // To do: Implement support for this (via modifying the EASTL type
1260  // traits headers, as CodeWarrior provides this.
1261  #else
1262  #define EASTL_STD_TYPE_TRAITS_AVAILABLE 0
1263  #endif
1264  */
1265 #endif
1266 
1267 
1268 
1270 // EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE
1271 //
1272 // Defined as 0 or 1; default is based on auto-detection.
1273 // Specifies whether the compiler provides built-in compiler type trait support
1274 // (e.g. __is_abstract()). Does not specify any details about which traits
1275 // are available or what their standards-compliance is. Nevertheless this is a
1276 // useful macro identifier for our type traits implementation.
1277 //
1278 #ifndef EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE
1279  #if defined(_MSC_VER) && (_MSC_VER >= 1500) && !defined(EA_COMPILER_CLANG_CL) // VS2008 or later
1280  #pragma warning(push, 0)
1281  #include <yvals.h>
1282  #pragma warning(pop)
1283  #if ((defined(_HAS_TR1) && _HAS_TR1) || _MSC_VER >= 1700) // VS2012 (1700) and later has built-in type traits support.
1284  #define EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE 1
1285  #else
1286  #define EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE 0
1287  #endif
1288  #elif defined(__clang__) && defined(__APPLE__) && defined(_CXXCONFIG) // Apple clang but with GCC's libstdc++.
1289  #define EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE 0
1290  #elif defined(__clang__)
1291  #define EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE 1
1292  #elif defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4003) && !defined(__GCCXML__)
1293  #define EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE 1
1294  #elif defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) // CodeWarrior compiler.
1295  #define EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE 1
1296  #else
1297  #define EASTL_COMPILER_INTRINSIC_TYPE_TRAITS_AVAILABLE 0
1298  #endif
1299 #endif
1300 
1301 
1302 
1304 // EASTL_RESET_ENABLED
1305 //
1306 // Defined as 0 or 1; default is 1 for the time being.
1307 // The reset_lose_memory function works the same as reset, as described below.
1308 //
1309 // Specifies whether the container reset functionality is enabled. If enabled
1310 // then <container>::reset forgets its memory, otherwise it acts as the clear
1311 // function. The reset function is potentially dangerous, as it (by design)
1312 // causes containers to not free their memory.
1313 // This option has no applicability to the bitset::reset function, as bitset
1314 // isn't really a container. Also it has no applicability to the smart pointer
1315 // wrappers (e.g. intrusive_ptr).
1316 //
1318 
1319 #ifndef EASTL_RESET_ENABLED
1320  #define EASTL_RESET_ENABLED 0
1321 #endif
1322 
1323 
1324 
1326 // EASTL_MINMAX_ENABLED
1327 //
1328 // Defined as 0 or 1; default is 1.
1329 // Specifies whether the min and max algorithms are available.
1330 // It may be useful to disable the min and max algorithms because sometimes
1331 // #defines for min and max exist which would collide with EASTL min and max.
1332 // Note that there are already alternative versions of min and max in EASTL
1333 // with the min_alt and max_alt functions. You can use these without colliding
1334 // with min/max macros that may exist.
1335 //
1337 #ifndef EASTL_MINMAX_ENABLED
1338  #define EASTL_MINMAX_ENABLED 1
1339 #endif
1340 
1341 
1342 
1344 // EASTL_NOMINMAX
1345 //
1346 // Defined as 0 or 1; default is 1.
1347 // MSVC++ has #defines for min/max which collide with the min/max algorithm
1348 // declarations. If EASTL_NOMINMAX is defined as 1, then we undefine min and
1349 // max if they are #defined by an external library. This allows our min and
1350 // max definitions in algorithm.h to work as expected. An alternative to
1351 // the enabling of EASTL_NOMINMAX is to #define NOMINMAX in your project
1352 // settings if you are compiling for Windows.
1353 // Note that this does not control the availability of the EASTL min and max
1354 // algorithms; the EASTL_MINMAX_ENABLED configuration parameter does that.
1355 //
1357 
1358 #ifndef EASTL_NOMINMAX
1359  #define EASTL_NOMINMAX 1
1360 #endif
1361 
1362 
1363 
1365 // EASTL_STD_CPP_ONLY
1366 //
1367 // Defined as 0 or 1; default is 0.
1368 // Disables the use of compiler language extensions. We use compiler language
1369 // extensions only in the case that they provide some benefit that can't be
1370 // had any other practical way. But sometimes the compiler is set to disable
1371 // language extensions or sometimes one compiler's preprocesor is used to generate
1372 // code for another compiler, and so it's necessary to disable language extension usage.
1373 //
1374 // Example usage:
1375 // #if defined(_MSC_VER) && !EASTL_STD_CPP_ONLY
1376 // enum : size_type { npos = container_type::npos }; // Microsoft extension which results in significantly smaller debug symbols.
1377 // #else
1378 // static const size_type npos = container_type::npos;
1379 // #endif
1380 //
1382 
1383 #ifndef EASTL_STD_CPP_ONLY
1384  #define EASTL_STD_CPP_ONLY 0
1385 #endif
1386 
1387 
1388 
1390 // EASTL_NO_RVALUE_REFERENCES
1391 //
1392 // Defined as 0 or 1.
1393 // This is the same as EABase EA_COMPILER_NO_RVALUE_REFERENCES except that it
1394 // follows the convention of being always defined, as 0 or 1.
1396 #if !defined(EASTL_NO_RVALUE_REFERENCES)
1397  #if defined(EA_COMPILER_NO_RVALUE_REFERENCES)
1398  #define EASTL_NO_RVALUE_REFERENCES 1
1399  #else
1400  #define EASTL_NO_RVALUE_REFERENCES 0
1401  #endif
1402 #endif
1403 
1404 
1405 
1407 // EASTL_MOVE_SEMANTICS_ENABLED
1408 //
1409 // Defined as 0 or 1.
1410 // If enabled then C++11-like functionality with rvalue references and move
1411 // operations is enabled.
1413 #if !defined(EASTL_MOVE_SEMANTICS_ENABLED)
1414  #if EASTL_NO_RVALUE_REFERENCES // If the compiler doesn't support rvalue references or EASTL is configured to disable them...
1415  #define EASTL_MOVE_SEMANTICS_ENABLED 0
1416  #else
1417  #define EASTL_MOVE_SEMANTICS_ENABLED 1
1418  #endif
1419 #endif
1420 
1421 
1422 
1424 // EASTL_VARIADIC_TEMPLATES_ENABLED
1425 //
1426 // Defined as 0 or 1.
1427 // If enabled then C++11-like functionality with variadic templates is enabled.
1429 #if !defined(EASTL_VARIADIC_TEMPLATES_ENABLED)
1430  #if defined(EA_COMPILER_NO_VARIADIC_TEMPLATES) // If the compiler doesn't support variadic templates
1431  #define EASTL_VARIADIC_TEMPLATES_ENABLED 0
1432  #else
1433  #define EASTL_VARIADIC_TEMPLATES_ENABLED 1
1434  #endif
1435 #endif
1436 
1438 // EASTL_VARIABLE_TEMPLATES_ENABLED
1439 //
1440 // Defined as 0 or 1.
1441 // If enabled then C++11-like functionality with variable templates is enabled.
1443 #if !defined(EASTL_VARIABLE_TEMPLATES_ENABLED)
1444  #if((EABASE_VERSION_N < 20605) || defined(EA_COMPILER_NO_VARIABLE_TEMPLATES))
1445  #define EASTL_VARIABLE_TEMPLATES_ENABLED 0
1446  #else
1447  #define EASTL_VARIABLE_TEMPLATES_ENABLED 1
1448  #endif
1449 #endif
1450 
1452 // EASTL_INLINE_VARIABLE_ENABLED
1453 //
1454 // Defined as 0 or 1.
1455 // If enabled then C++17-like functionality with inline variable is enabled.
1457 #if !defined(EASTL_INLINE_VARIABLE_ENABLED)
1458  #if((EABASE_VERSION_N < 20707) || defined(EA_COMPILER_NO_INLINE_VARIABLES))
1459  #define EASTL_INLINE_VARIABLE_ENABLED 0
1460  #else
1461  #define EASTL_INLINE_VARIABLE_ENABLED 1
1462  #endif
1463 #endif
1464 
1466 // EASTL_CPP17_INLINE_VARIABLE
1467 //
1468 // Used to prefix a variable as inline when C++17 inline variables are available
1469 // Usage: EASTL_CPP17_INLINE_VARIABLE constexpr bool type_trait_v = type_trait::value
1471 #if !defined(EASTL_CPP17_INLINE_VARIABLE)
1472  #if EASTL_INLINE_VARIABLE_ENABLED
1473  #define EASTL_CPP17_INLINE_VARIABLE inline
1474  #else
1475  #define EASTL_CPP17_INLINE_VARIABLE
1476  #endif
1477 #endif
1478 
1480 // EASTL_HAVE_CPP11_TYPE_TRAITS
1481 //
1482 // Defined as 0 or 1.
1483 // This is the same as EABase EA_HAVE_CPP11_TYPE_TRAITS except that it
1484 // follows the convention of being always defined, as 0 or 1. Note that this
1485 // identifies if the Standard Library has C++11 type traits and not if EASTL
1486 // has its equivalents to C++11 type traits.
1488 #if !defined(EASTL_HAVE_CPP11_TYPE_TRAITS)
1489  // To do: Change this to use the EABase implementation once we have a few months of testing
1490  // of this and we are sure it works right. Do this at some point after ~January 2014.
1491  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
1492  #define EASTL_HAVE_CPP11_TYPE_TRAITS 1
1493  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4007) // Prior versions of libstdc++ have incomplete support for C++11 type traits.
1494  #define EASTL_HAVE_CPP11_TYPE_TRAITS 1
1495  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
1496  #define EASTL_HAVE_CPP11_TYPE_TRAITS 1
1497  #else
1498  #define EASTL_HAVE_CPP11_TYPE_TRAITS 0
1499  #endif
1500 #endif
1501 
1502 
1503 
1505 // EA_COMPILER_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS undef
1506 //
1507 // We need revise this macro to be undefined in some cases, in case the user
1508 // isn't using an updated EABase.
1510 #if defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 403) // It may in fact be supported by 4.01 or 4.02 but we don't have compilers to test with.
1511  #if defined(EA_COMPILER_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
1512  #undef EA_COMPILER_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
1513  #endif
1514 #endif
1515 
1516 
1517 
1519 // EASTL_NO_RANGE_BASED_FOR_LOOP
1520 //
1521 // Defined as 0 or 1.
1522 // This is the same as EABase EA_COMPILER_NO_RANGE_BASED_FOR_LOOP except that it
1523 // follows the convention of being always defined, as 0 or 1.
1525 #if !defined(EASTL_NO_RANGE_BASED_FOR_LOOP)
1526  #if defined(EA_COMPILER_NO_RANGE_BASED_FOR_LOOP)
1527  #define EASTL_NO_RANGE_BASED_FOR_LOOP 1
1528  #else
1529  #define EASTL_NO_RANGE_BASED_FOR_LOOP 0
1530  #endif
1531 #endif
1532 
1533 
1534 
1536 // EASTL_ALIGN_OF
1537 //
1538 // Determines the alignment of a type.
1539 //
1540 // Example usage:
1541 // size_t alignment = EASTL_ALIGN_OF(int);
1542 //
1544 #ifndef EASTL_ALIGN_OF
1545  #define EASTL_ALIGN_OF alignof
1546 #endif
1547 
1548 
1549 
1550 
1552 // eastl_size_t
1553 //
1554 // Defined as an unsigned integer type, usually either size_t or uint32_t.
1555 // Defaults to size_t to match std STL unless the user specifies to use
1556 // uint32_t explicitly via the EASTL_SIZE_T_32BIT define
1557 //
1558 // Example usage:
1559 // eastl_size_t n = intVector.size();
1560 //
1562 
1563 #ifndef EASTL_SIZE_T_32BIT // Defines whether EASTL_SIZE_T uses uint32_t/int32_t as opposed to size_t/ssize_t.
1564  #define EASTL_SIZE_T_32BIT 0 // This makes a difference on 64 bit platforms because they use a 64 bit size_t.
1565 #endif // By default we do the same thing as std STL and use size_t.
1566 
1567 #ifndef EASTL_SIZE_T
1568  #if (EASTL_SIZE_T_32BIT == 0) || (EA_PLATFORM_WORD_SIZE == 4)
1569  #include <stddef.h>
1570  #define EASTL_SIZE_T size_t
1571  #define EASTL_SSIZE_T intptr_t
1572  #else
1573  #define EASTL_SIZE_T uint32_t
1574  #define EASTL_SSIZE_T int32_t
1575  #endif
1576 #endif
1577 
1578 typedef EASTL_SIZE_T eastl_size_t; // Same concept as std::size_t.
1579 typedef EASTL_SSIZE_T eastl_ssize_t; // Signed version of eastl_size_t. Concept is similar to Posix's ssize_t.
1580 
1581 
1582 
1583 
1585 // AddRef / Release
1586 //
1587 // AddRef and Release are used for "intrusive" reference counting. By the term
1588 // "intrusive", we mean that the reference count is maintained by the object
1589 // and not by the user of the object. Given that an object implements referencing
1590 // counting, the user of the object needs to be able to increment and decrement
1591 // that reference count. We do that via the venerable AddRef and Release functions
1592 // which the object must supply. These defines here allow us to specify the name
1593 // of the functions. They could just as well be defined to addref and delref or
1594 // IncRef and DecRef.
1595 //
1597 
1598 #ifndef EASTLAddRef
1599  #define EASTLAddRef AddRef
1600 #endif
1601 
1602 #ifndef EASTLRelease
1603  #define EASTLRelease Release
1604 #endif
1605 
1606 
1607 
1608 
1610 // EASTL_ALLOCATOR_EXPLICIT_ENABLED
1611 //
1612 // Defined as 0 or 1. Default is 0 for now but ideally would be changed to
1613 // 1 some day. It's 0 because setting it to 1 breaks some existing code.
1614 // This option enables the allocator ctor to be explicit, which avoids
1615 // some undesirable silent conversions, especially with the string class.
1616 //
1617 // Example usage:
1618 // class allocator
1619 // {
1620 // public:
1621 // EASTL_ALLOCATOR_EXPLICIT allocator(const char* pName);
1622 // };
1623 //
1625 
1626 #ifndef EASTL_ALLOCATOR_EXPLICIT_ENABLED
1627  #define EASTL_ALLOCATOR_EXPLICIT_ENABLED 0
1628 #endif
1629 
1630 #if EASTL_ALLOCATOR_EXPLICIT_ENABLED
1631  #define EASTL_ALLOCATOR_EXPLICIT explicit
1632 #else
1633  #define EASTL_ALLOCATOR_EXPLICIT
1634 #endif
1635 
1636 
1637 
1639 // EASTL_ALLOCATOR_MIN_ALIGNMENT
1640 //
1641 // Defined as an integral power-of-2 that's >= 1.
1642 // Identifies the minimum alignment that EASTL should assume its allocators
1643 // use. There is code within EASTL that decides whether to do a Malloc or
1644 // MallocAligned call and it's typically better if it can use the Malloc call.
1645 // But this requires knowing what the minimum possible alignment is.
1646 #if !defined(EASTL_ALLOCATOR_MIN_ALIGNMENT)
1647  #define EASTL_ALLOCATOR_MIN_ALIGNMENT EA_PLATFORM_MIN_MALLOC_ALIGNMENT
1648 #endif
1649 
1650 
1652 // EASTL_SYSTEM_ALLOCATOR_MIN_ALIGNMENT
1653 //
1654 // Identifies the minimum alignment that EASTL should assume system allocations
1655 // from malloc and new will have.
1656 #if !defined(EASTL_SYSTEM_ALLOCATOR_MIN_ALIGNMENT)
1657  #if defined(EA_PLATFORM_MICROSOFT) || defined(EA_PLATFORM_APPLE)
1658  #define EASTL_SYSTEM_ALLOCATOR_MIN_ALIGNMENT 16
1659  #else
1660  #define EASTL_SYSTEM_ALLOCATOR_MIN_ALIGNMENT (EA_PLATFORM_PTR_SIZE * 2)
1661  #endif
1662 #endif
1663 
1664 
1666 // EASTL allocator
1667 //
1668 // The EASTL allocator system allows you to redefine how memory is allocated
1669 // via some defines that are set up here. In the container code, memory is
1670 // allocated via macros which expand to whatever the user has them set to
1671 // expand to. Given that there are multiple allocator systems available,
1672 // this system allows you to configure it to use whatever system you want,
1673 // provided your system meets the requirements of this library.
1674 // The requirements are:
1675 //
1676 // - Must be constructable via a const char* (name) parameter.
1677 // Some uses of allocators won't require this, however.
1678 // - Allocate a block of memory of size n and debug name string.
1679 // - Allocate a block of memory of size n, debug name string,
1680 // alignment a, and offset o.
1681 // - Free memory allocated via either of the allocation functions above.
1682 // - Provide a default allocator instance which can be used if the user
1683 // doesn't provide a specific one.
1684 //
1686 
1687 // namespace eastl
1688 // {
1689 // class allocator
1690 // {
1691 // allocator(const char* pName = NULL);
1692 //
1693 // void* allocate(size_t n, int flags = 0);
1694 // void* allocate(size_t n, size_t alignment, size_t offset, int flags = 0);
1695 // void deallocate(void* p, size_t n);
1696 //
1697 // const char* get_name() const;
1698 // void set_name(const char* pName);
1699 // };
1700 //
1701 // allocator* GetDefaultAllocator(); // This is used for anonymous allocations.
1702 // }
1703 
1704 #ifndef EASTLAlloc // To consider: Instead of calling through pAllocator, just go directly to operator new, since that's what allocator does.
1705  #define EASTLAlloc(allocator, n) (allocator).allocate(n);
1706 #endif
1707 
1708 #ifndef EASTLAllocFlags // To consider: Instead of calling through pAllocator, just go directly to operator new, since that's what allocator does.
1709  #define EASTLAllocFlags(allocator, n, flags) (allocator).allocate(n, flags);
1710 #endif
1711 
1712 #ifndef EASTLAllocAligned
1713  #define EASTLAllocAligned(allocator, n, alignment, offset) (allocator).allocate((n), (alignment), (offset))
1714 #endif
1715 
1716 #ifndef EASTLAllocAlignedFlags
1717  #define EASTLAllocAlignedFlags(allocator, n, alignment, offset, flags) (allocator).allocate((n), (alignment), (offset), (flags))
1718 #endif
1719 
1720 #ifndef EASTLFree
1721  #define EASTLFree(allocator, p, size) (allocator).deallocate((void*)(p), (size)) // Important to cast to void* as p may be non-const.
1722 #endif
1723 
1724 #ifndef EASTLAllocatorType
1725  #define EASTLAllocatorType eastl::allocator
1726 #endif
1727 
1728 #ifndef EASTLDummyAllocatorType
1729  #define EASTLDummyAllocatorType eastl::dummy_allocator
1730 #endif
1731 
1732 #ifndef EASTLAllocatorDefault
1733  // EASTLAllocatorDefault returns the default allocator instance. This is not a global
1734  // allocator which implements all container allocations but is the allocator that is
1735  // used when EASTL needs to allocate memory internally. There are very few cases where
1736  // EASTL allocates memory internally, and in each of these it is for a sensible reason
1737  // that is documented to behave as such.
1738  #define EASTLAllocatorDefault eastl::GetDefaultAllocator
1739 #endif
1740 
1741 
1746 #ifndef EASTL_ALLOCATOR_DEFAULT_NAME
1747  #define EASTL_ALLOCATOR_DEFAULT_NAME EASTL_DEFAULT_NAME_PREFIX // Unless the user overrides something, this is "EASTL".
1748 #endif
1749 
1755 #ifndef EASTL_USE_FORWARD_WORKAROUND
1756  #if defined(_MSC_FULL_VER) && _MSC_FULL_VER == 180021005 || (defined(__EDG_VERSION__) && (__EDG_VERSION__ < 405))// VS2013 initial release
1757  #define EASTL_USE_FORWARD_WORKAROUND 1
1758  #else
1759  #define EASTL_USE_FORWARD_WORKAROUND 0
1760  #endif
1761 #endif
1762 
1763 
1766 #if EASTL_VARIADIC_TEMPLATES_ENABLED && !defined(EA_COMPILER_NO_TEMPLATE_ALIASES)
1767  #define EASTL_TUPLE_ENABLED 1
1768 #else
1769  #define EASTL_TUPLE_ENABLED 0
1770 #endif
1771 
1772 
1775 #ifndef EASTL_FUNCTION_ENABLED
1776  #define EASTL_FUNCTION_ENABLED 1
1777 #endif
1778 
1779 
1781 #ifndef EASTL_USER_LITERALS_ENABLED
1782  #if defined(EA_COMPILER_CPP14_ENABLED)
1783  #define EASTL_USER_LITERALS_ENABLED 1
1784 
1785  // Disabling the Clang/GCC/MSVC warning about using user defined literals without a leading '_' as they are
1786  // reserved for standard libary usage.
1787  EA_DISABLE_CLANG_WARNING(-Wuser-defined-literals)
1788  EA_DISABLE_CLANG_WARNING(-Wreserved-user-defined-literal)
1789  EA_DISABLE_GCC_WARNING(-Wliteral-suffix)
1790  #ifdef _MSC_VER
1791  #pragma warning(disable: 4455) // disable warning C4455: literal suffix identifiers that do not start with an underscore are reserved
1792  #endif
1793 
1794  #else
1795  #define EASTL_USER_LITERALS_ENABLED 0
1796  #endif
1797 #endif
1798 
1799 
1801 #ifndef EASTL_INLINE_NAMESPACES_ENABLED
1802  #if defined(EA_COMPILER_CPP14_ENABLED)
1803  #define EASTL_INLINE_NAMESPACES_ENABLED 1
1804  #else
1805  #define EASTL_INLINE_NAMESPACES_ENABLED 0
1806  #endif
1807 #endif
1808 
1809 
1811 #ifndef EASTL_CORE_ALLOCATOR_ENABLED
1812  #define EASTL_CORE_ALLOCATOR_ENABLED 0
1813 #endif
1814 
1821 #ifndef EASTL_OPENSOURCE
1822  #define EASTL_OPENSOURCE 0
1823 #endif
1824 
1825 
1827 #if defined(EA_COMPILER_MSVC_2012)
1828  #define EASTL_OPTIONAL_ENABLED 0
1829 #elif defined(EA_COMPILER_MSVC_2013)
1830  #define EASTL_OPTIONAL_ENABLED 0
1831 #elif defined(EA_COMPILER_MSVC_2015)
1832  #define EASTL_OPTIONAL_ENABLED 1
1833 #elif EASTL_VARIADIC_TEMPLATES_ENABLED && !defined(EA_COMPILER_NO_TEMPLATE_ALIASES) && !defined(EA_COMPILER_NO_DEFAULTED_FUNCTIONS) && defined(EA_COMPILER_CPP11_ENABLED)
1834  #define EASTL_OPTIONAL_ENABLED 1
1835 #else
1836  #define EASTL_OPTIONAL_ENABLED 0
1837 #endif
1838 
1839 
1841 #if defined(__clang__)
1842  #if !__is_identifier(__has_unique_object_representations)
1843  #define EASTL_HAS_UNIQUE_OBJECT_REPRESENTATIONS_AVAILABLE 1
1844  #else
1845  #define EASTL_HAS_UNIQUE_OBJECT_REPRESENTATIONS_AVAILABLE 0
1846  #endif
1847 #elif defined(_MSC_VER) && (_MSC_VER >= 1913) // VS2017+
1848  #define EASTL_HAS_UNIQUE_OBJECT_REPRESENTATIONS_AVAILABLE 1
1849 #else
1850  #define EASTL_HAS_UNIQUE_OBJECT_REPRESENTATIONS_AVAILABLE 0
1851 #endif
1852 
1853 
1857 #ifndef EASTL_ENABLE_PAIR_FIRST_ELEMENT_CONSTRUCTOR
1858  #define EASTL_ENABLE_PAIR_FIRST_ELEMENT_CONSTRUCTOR 0
1859 #endif
1860 
1866 #if defined(EA_SYSTEM_BIG_ENDIAN)
1867  #define EASTL_SYSTEM_BIG_ENDIAN_STATEMENT(...) __VA_ARGS__
1868 #else
1869  #define EASTL_SYSTEM_BIG_ENDIAN_STATEMENT(...)
1870 #endif
1871 
1872 #if defined(EA_SYSTEM_LITTLE_ENDIAN)
1873  #define EASTL_SYSTEM_LITTLE_ENDIAN_STATEMENT(...) __VA_ARGS__
1874 #else
1875  #define EASTL_SYSTEM_LITTLE_ENDIAN_STATEMENT(...)
1876 #endif
1877 
1882 #if (defined(EA_COMPILER_MSVC) && defined(EA_COMPILER_MSVC_VERSION_14_26) && EA_COMPILER_VERSION >= EA_COMPILER_MSVC_VERSION_14_26) \
1883  || EA_COMPILER_HAS_BUILTIN(__builtin_bit_cast)
1884  #define EASTL_CONSTEXPR_BIT_CAST_SUPPORTED 1
1885 #else
1886  #define EASTL_CONSTEXPR_BIT_CAST_SUPPORTED 0
1887 #endif
1888 
1889 
1890 
1891 #endif // Header include guard
EA Standard Template Library.
Definition: algorithm.h:288
EASTL_API void AssertionFailureFunctionDefault(const char *pExpression, void *pContext)
Definition: assert.cpp:64
EASTL_API void AssertionFailure(const char *pExpression)
Definition: assert.cpp:90
EASTL_API void SetAssertionFailureFunction(EASTL_AssertionFailureFunction pFunction, void *pContext)
Definition: assert.cpp:54
Definition: int128.h:138
Definition: int128.h:203