STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
yvals.h
Go to the documentation of this file.
1 // yvals.h internal header
2 #pragma once
3 #ifndef _YVALS
4 #define _YVALS
5 #ifndef RC_INVOKED
6 
7 // _HAS_CXX17 directly controls:
8 // P0025R1 clamp()
9 // P0032R3 Homogeneous Interface For variant/any/optional
10 // P0077R2 is_callable, is_nothrow_callable
11 // P0088R3 <variant>
12 // P0163R0 shared_ptr::weak_type
13 // P0185R1 is_swappable, is_nothrow_swappable
14 // P0209R2 make_from_tuple()
15 // P0220R1 <any>, <optional>, <string_view>, apply(), sample()
16 // (other components not yet implemented)
17 // P0254R2 Integrating string_view And std::string
18 // P0272R1 Non-const basic_string::data()
19 // P0307R2 Making Optional Greater Equal Again
20 // P0393R3 Making Variant Greater Equal
21 // P0504R0 Revisiting in_place_t/in_place_type_t<T>/in_place_index_t<I>
22 // P0510R0 Rejecting variants Of Nothing, Arrays, References, And Incomplete Types
23 
24 // _HAS_CXX17 indirectly controls:
25 // N4190 Removing auto_ptr, random_shuffle(), And Old <functional> Stuff
26 // P0004R1 Removing Deprecated Iostreams Aliases
27 // LWG 2385 function::assign allocator argument doesn't make sense
28 // The non-Standard std::tr1 namespace and TR1-only machinery
29 // The non-Standard std::identity struct
30 
31  #ifndef _HAS_CXX17
32  #if defined(_MSVC_LANG) && !(defined(__EDG__) && defined(__clang__)) // TRANSITION, VSO#273681
33  #if _MSVC_LANG > 201402
34  #define _HAS_CXX17 1
35  #else /* _MSVC_LANG > 201402 */
36  #define _HAS_CXX17 0
37  #endif /* _MSVC_LANG > 201402 */
38  #else /* _MSVC_LANG etc. */
39  #if __cplusplus > 201402
40  #define _HAS_CXX17 1
41  #else /* __cplusplus > 201402 */
42  #define _HAS_CXX17 0
43  #endif /* __cplusplus > 201402 */
44  #endif /* _MSVC_LANG etc. */
45  #endif /* _HAS_CXX17 */
46 
47 #include <xkeycheck.h> // _HAS_CXX17 must be defined before including this
48 #include <crtdefs.h>
49 
50 #ifndef _STL_WARNING_LEVEL
51  #if defined(_MSVC_WARNING_LEVEL) && _MSVC_WARNING_LEVEL >= 4
52  #define _STL_WARNING_LEVEL 4
53  #else /* defined(_MSVC_WARNING_LEVEL) && _MSVC_WARNING_LEVEL >= 4 */
54  #define _STL_WARNING_LEVEL 3
55  #endif /* defined(_MSVC_WARNING_LEVEL) && _MSVC_WARNING_LEVEL >= 4 */
56 #endif /* _STL_WARNING_LEVEL */
57 
58 #if _STL_WARNING_LEVEL < 3
59  #error _STL_WARNING_LEVEL cannot be less than 3.
60 #endif /* _STL_WARNING_LEVEL < 3 */
61 
62 #if _STL_WARNING_LEVEL > 4
63  #error _STL_WARNING_LEVEL cannot be greater than 4.
64 #endif /* _STL_WARNING_LEVEL > 4 */
65 
66 #ifndef _STL_EXTRA_DISABLED_WARNINGS
67  #define _STL_EXTRA_DISABLED_WARNINGS
68 #endif /* _STL_EXTRA_DISABLED_WARNINGS */
69 
70 // warning C4702: unreachable code
71 #ifndef _STL_DISABLED_WARNINGS
72  #define _STL_DISABLED_WARNINGS 4702 _STL_EXTRA_DISABLED_WARNINGS
73 #endif /* _STL_DISABLED_WARNINGS */
74 
75 #pragma pack(push,_CRT_PACKING)
76 #pragma warning(push,_STL_WARNING_LEVEL)
77 #pragma warning(disable: _STL_DISABLED_WARNINGS)
78 #pragma push_macro("new")
79 #undef new
80 
81 #define _CPPLIB_VER 650
82 
83  #if _HAS_EXCEPTIONS
84  #define _NOEXCEPT noexcept
85  #define _NOEXCEPT_OP(x) noexcept(x)
86  #else /* _HAS_EXCEPTIONS */
87  #define _NOEXCEPT throw ()
88  #define _NOEXCEPT_OP(x)
89  #endif /* _HAS_EXCEPTIONS */
90 
91  #ifndef _HAS_CONSTEXPR14
92  #if defined(__cpp_constexpr)
93  #if __cpp_constexpr >= 201304
94  #define _HAS_CONSTEXPR14 1
95  #else /* ^^^ __cpp_constexpr >= 201304 / __cpp_constexpr < 201304 vvv */
96  #define _HAS_CONSTEXPR14 0
97  #endif /* __cpp_constexpr >= 201304 */
98  #elif defined(_MSC_FULL_VER)
99  #if _MSC_FULL_VER >= 190024318
100  #define _HAS_CONSTEXPR14 1
101  #else /* ^^^ _MSC_FULL_VER >= 190024318 / _MSC_FULL_VER < 190024318 vvv */
102  #define _HAS_CONSTEXPR14 0
103  #endif /* _MSC_FULL_VER >= 190024318 */
104  #elif __cplusplus >= 201402
105  #define _HAS_CONSTEXPR14 1
106  #else /* ^^^ __cplusplus >= 201402 / __cplusplus < 201402 vvv */
107  #define _HAS_CONSTEXPR14 0
108  #endif /* __cpp_constexpr */
109  #endif /* _HAS_CONSTEXPR14 */
110 
111  #if _HAS_CONSTEXPR14
112  #define _CONSTEXPR14 constexpr
113  #else /* ^^^ has relaxed constexpr ^^^ / vvv no relaxed constexpr vvv */
114  #define _CONSTEXPR14 inline
115  #endif /* _HAS_CONSTEXPR14 */
116 
117  // C++17 constexpr additions implementable without C++14 relaxed constexpr
118  #if _HAS_CXX17
119  #define _CONSTEXPR17_11 constexpr
120  #else /* ^^^ has C++17 constexpr additions ^^^ / vvv no C++17 constexpr additions vvv */
121  #define _CONSTEXPR17_11 inline
122  #endif /* _HAS_CXX17 */
123 
124  // C++17 constexpr additions implementable with C++14 relaxed constexpr
125  #if _HAS_CXX17 && _HAS_CONSTEXPR14
126  #define _CONSTEXPR17_14 constexpr
127  #else /* ^^^ has C++17 constexpr additions ^^^ / vvv no C++17 constexpr additions vvv */
128  #define _CONSTEXPR17_14 inline
129  #endif /* _HAS_CXX17 && _HAS_CONSTEXPR14 */
130 
131 // N4190 Removing auto_ptr, random_shuffle(), And Old <functional> Stuff
132  #ifndef _HAS_AUTO_PTR_ETC
133  #if _HAS_CXX17
134  #define _HAS_AUTO_PTR_ETC 0
135  #else /* _HAS_CXX17 */
136  #define _HAS_AUTO_PTR_ETC 1
137  #endif /* _HAS_CXX17 */
138  #endif /* _HAS_AUTO_PTR_ETC */
139 
140 // P0004R1 Removing Deprecated Iostreams Aliases
141  #ifndef _HAS_OLD_IOSTREAMS_MEMBERS
142  #if _HAS_CXX17
143  #define _HAS_OLD_IOSTREAMS_MEMBERS 0
144  #else /* _HAS_CXX17 */
145  #define _HAS_OLD_IOSTREAMS_MEMBERS 1
146  #endif /* _HAS_CXX17 */
147  #endif /* _HAS_OLD_IOSTREAMS_MEMBERS */
148 
149 // LWG 2385 function::assign allocator argument doesn't make sense
150  #ifndef _HAS_FUNCTION_ASSIGN
151  #if _HAS_CXX17
152  #define _HAS_FUNCTION_ASSIGN 0
153  #else /* _HAS_CXX17 */
154  #define _HAS_FUNCTION_ASSIGN 1
155  #endif /* _HAS_CXX17 */
156  #endif /* _HAS_FUNCTION_ASSIGN */
157 
158 // The non-Standard std::tr1 namespace and TR1-only machinery
159  #ifndef _HAS_TR1_NAMESPACE
160  #if _HAS_CXX17
161  #define _HAS_TR1_NAMESPACE 0
162  #else /* _HAS_CXX17 */
163  #define _HAS_TR1_NAMESPACE 1
164  #endif /* _HAS_CXX17 */
165  #endif /* _HAS_TR1_NAMESPACE */
166 
167 // The non-Standard std::identity struct
168  #ifndef _HAS_IDENTITY_STRUCT
169  #if _HAS_CXX17
170  #define _HAS_IDENTITY_STRUCT 0
171  #else /* _HAS_CXX17 */
172  #define _HAS_IDENTITY_STRUCT 1
173  #endif /* _HAS_CXX17 */
174  #endif /* _HAS_IDENTITY_STRUCT */
175 
176 
177  #ifdef _RTC_CONVERSION_CHECKS_ENABLED
178  #ifndef _ALLOW_RTCc_IN_STL
179 static_assert(false, "/RTCc rejects conformant code, "
180  "so it isn't supported by the C++ Standard Library. "
181  "Either remove this compiler option, or define _ALLOW_RTCc_IN_STL "
182  "to acknowledge that you have received this warning.");
183  #endif /* _ALLOW_RTCc_IN_STL */
184  #endif /* _RTC_CONVERSION_CHECKS_ENABLED */
185 
186 /* Note on use of "deprecate":
187  * Various places in this header and other headers use __declspec(deprecate) or macros that
188  * have the term DEPRECATE in them. We use deprecate here ONLY to signal the compiler to
189  * emit a warning about these items. The use of deprecate should NOT be taken to imply that
190  * any standard committee has deprecated these functions from the relevant standards.
191  * In fact, these functions are NOT deprecated from the standard.
192  *
193  * Full details can be found in our documentation by searching for "Checked Iterators".
194 */
195 
196 #if defined(MRTDLL) && defined(_CRTBLD)
197 /*
198 process-global is the default for code built with /clr or /clr:oldSyntax.
199 appdomain-global is the default for code built with /clr:pure.
200 Code in MSVCM is built with /clr, but is used by user code built with /clr:pure
201 so it must conform to the expectations of /clr:pure clients.
202 Use __PURE_APPDOMAIN_GLOBAL when a global needs to be appdomain-global for pure
203 clients and process-global for mixed clients.
204 */
205 #define __PURE_APPDOMAIN_GLOBAL __declspec(appdomain)
206 #else
207 #define __PURE_APPDOMAIN_GLOBAL
208 #endif
209 
210  /* CURRENT DLL NAMES */
211 #ifndef _CRT_MSVCP_CURRENT
212  #ifdef _CRT_WINDOWS
213  /* Windows */
214  #ifdef _DEBUG
215  #define _CRT_MSVCP_CURRENT "msvcpd_win.dll"
216  #else
217  #define _CRT_MSVCP_CURRENT "msvcp_win.dll"
218  #endif
219  #else
220  /* Visual Studio */
221  #ifdef _DEBUG
222  #define _CRT_MSVCP_CURRENT "msvcp140d.dll"
223  #else
224  #define _CRT_MSVCP_CURRENT "msvcp140.dll"
225  #endif
226  #endif
227 #endif
228 
229 #ifdef _ITERATOR_DEBUG_LEVEL /* A. _ITERATOR_DEBUG_LEVEL is already defined. */
230 
231  /* A1. Validate _ITERATOR_DEBUG_LEVEL. */
232  #if _ITERATOR_DEBUG_LEVEL > 2 && defined(_DEBUG)
233  #error _ITERATOR_DEBUG_LEVEL > 2 is not supported in debug mode.
234  #elif _ITERATOR_DEBUG_LEVEL > 1 && !defined(_DEBUG)
235  #error _ITERATOR_DEBUG_LEVEL > 1 is not supported in release mode.
236  #endif
237 
238  /* A2. Inspect _HAS_ITERATOR_DEBUGGING. */
239  #ifdef _HAS_ITERATOR_DEBUGGING /* A2i. _HAS_ITERATOR_DEBUGGING is already defined, validate it. */
240  #if _ITERATOR_DEBUG_LEVEL == 2 && _HAS_ITERATOR_DEBUGGING != 1
241  #error _ITERATOR_DEBUG_LEVEL == 2 must imply _HAS_ITERATOR_DEBUGGING == 1 .
242  #elif _ITERATOR_DEBUG_LEVEL < 2 && _HAS_ITERATOR_DEBUGGING != 0
243  #error _ITERATOR_DEBUG_LEVEL < 2 must imply _HAS_ITERATOR_DEBUGGING == 0 .
244  #endif
245  #else /* A2ii. _HAS_ITERATOR_DEBUGGING is not yet defined, derive it. */
246  #if _ITERATOR_DEBUG_LEVEL == 2
247  #define _HAS_ITERATOR_DEBUGGING 1
248  #else
249  #define _HAS_ITERATOR_DEBUGGING 0
250  #endif
251  #endif /* _HAS_ITERATOR_DEBUGGING */
252 
253  /* A3. Inspect _SECURE_SCL. */
254  #ifdef _SECURE_SCL /* A3i. _SECURE_SCL is already defined, validate it. */
255  #if _ITERATOR_DEBUG_LEVEL > 0 && _SECURE_SCL != 1
256  #error _ITERATOR_DEBUG_LEVEL > 0 must imply _SECURE_SCL == 1 .
257  #elif _ITERATOR_DEBUG_LEVEL == 0 && _SECURE_SCL != 0
258  #error _ITERATOR_DEBUG_LEVEL == 0 must imply _SECURE_SCL == 0 .
259  #endif
260  #else /* A3ii. _SECURE_SCL is not yet defined, derive it. */
261  #if _ITERATOR_DEBUG_LEVEL > 0
262  #define _SECURE_SCL 1
263  #else
264  #define _SECURE_SCL 0
265  #endif
266  #endif /* _SECURE_SCL */
267 
268 #else /* B. _ITERATOR_DEBUG_LEVEL is not yet defined. */
269 
270  /* B1. Inspect _HAS_ITERATOR_DEBUGGING. */
271  #ifdef _HAS_ITERATOR_DEBUGGING /* B1i. _HAS_ITERATOR_DEBUGGING is already defined, validate it. */
272  #if _HAS_ITERATOR_DEBUGGING > 1
273  #error _HAS_ITERATOR_DEBUGGING must be either 0 or 1 .
274  #elif _HAS_ITERATOR_DEBUGGING == 1 && !defined(_DEBUG)
275  #error _HAS_ITERATOR_DEBUGGING == 1 is not supported in release mode.
276  #endif
277  #else /* B1ii. _HAS_ITERATOR_DEBUGGING is not yet defined, default it. */
278  #ifdef _DEBUG
279  #define _HAS_ITERATOR_DEBUGGING 1
280  #else
281  #define _HAS_ITERATOR_DEBUGGING 0
282  #endif
283  #endif /* _HAS_ITERATOR_DEBUGGING */
284 
285  /* B2. Inspect _SECURE_SCL. */
286  #ifdef _SECURE_SCL /* B2i. _SECURE_SCL is already defined, validate it. */
287  #if _SECURE_SCL > 1
288  #error _SECURE_SCL must be either 0 or 1 .
289  #endif
290  #else /* B2ii. _SECURE_SCL is not yet defined, default it. */
291  #if _HAS_ITERATOR_DEBUGGING == 1
292  #define _SECURE_SCL 1
293  #else
294  #define _SECURE_SCL 0
295  #endif
296  #endif /* _SECURE_SCL */
297 
298  /* B3. Derive _ITERATOR_DEBUG_LEVEL. */
299  #if _HAS_ITERATOR_DEBUGGING
300  #define _ITERATOR_DEBUG_LEVEL 2
301  #elif _SECURE_SCL
302  #define _ITERATOR_DEBUG_LEVEL 1
303  #else
304  #define _ITERATOR_DEBUG_LEVEL 0
305  #endif
306 
307 #endif /* _ITERATOR_DEBUG_LEVEL */
308 
309 #define _STRINGIZEX(x) #x
310 #define _STRINGIZE(x) _STRINGIZEX(x)
311 
312 #ifdef __cplusplus
313  #ifndef _ALLOW_MSC_VER_MISMATCH
314  #pragma detect_mismatch("_MSC_VER", "1900")
315  #endif /* _ALLOW_MSC_VER_MISMATCH */
316 
317  #ifndef _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH
318  #pragma detect_mismatch("_ITERATOR_DEBUG_LEVEL", _STRINGIZE(_ITERATOR_DEBUG_LEVEL))
319  #endif /* _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH */
320 
321  #ifndef _ALLOW_RUNTIME_LIBRARY_MISMATCH
322  #if !defined(_DLL) && !defined(_DEBUG)
323  #pragma detect_mismatch("RuntimeLibrary", "MT_StaticRelease")
324  #elif !defined(_DLL) && defined(_DEBUG)
325  #pragma detect_mismatch("RuntimeLibrary", "MTd_StaticDebug")
326  #elif defined(_DLL) && !defined(_DEBUG)
327  #pragma detect_mismatch("RuntimeLibrary", "MD_DynamicRelease")
328  #elif defined(_DLL) && defined(_DEBUG)
329  #pragma detect_mismatch("RuntimeLibrary", "MDd_DynamicDebug")
330  #endif /* defined(_DLL) etc. */
331  #endif /* _ALLOW_RUNTIME_LIBRARY_MISMATCH */
332 #endif /* __cplusplus */
333 
334 #ifdef _ITERATOR_DEBUG_ARRAY_OVERLOADS
335  #if _ITERATOR_DEBUG_ARRAY_OVERLOADS != 0 && _ITERATOR_DEBUG_ARRAY_OVERLOADS != 1
336  #error _ITERATOR_DEBUG_ARRAY_OVERLOADS must be either 0 or 1 .
337  #elif _ITERATOR_DEBUG_LEVEL == 0 && _ITERATOR_DEBUG_ARRAY_OVERLOADS == 1
338  #error _ITERATOR_DEBUG_LEVEL == 0 must imply _ITERATOR_DEBUG_ARRAY_OVERLOADS == 0 .
339  #endif
340 #else /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
341  #if _ITERATOR_DEBUG_LEVEL == 0
342  #define _ITERATOR_DEBUG_ARRAY_OVERLOADS 0
343  #else
344  #define _ITERATOR_DEBUG_ARRAY_OVERLOADS 1
345  #endif
346 #endif /* _ITERATOR_DEBUG_ARRAY_OVERLOADS */
347 
348 /* See note on use of deprecate at the top of this file */
349 #if !defined(_SCL_SECURE_NO_WARNINGS) && defined(_SCL_SECURE_NO_DEPRECATE)
350 #define _SCL_SECURE_NO_WARNINGS
351 #endif
352 
353 #if !defined (_SECURE_SCL_DEPRECATE)
354 #if defined(_SCL_SECURE_NO_WARNINGS)
355 #define _SECURE_SCL_DEPRECATE 0
356 #else
357 #define _SECURE_SCL_DEPRECATE 1
358 #endif
359 #endif
360 
361 /* _SECURE_SCL switches: helper macros */
362 /* See note on use of deprecate at the top of this file */
363 
364 #if _ITERATOR_DEBUG_LEVEL > 0 && _SECURE_SCL_DEPRECATE
365 #define _SCL_INSECURE_DEPRECATE_FN(_Func) \
366  _CRT_DEPRECATE_TEXT( \
367  "Call to 'std::" #_Func "' with parameters that may be unsafe - " \
368  "this call relies on the caller to check that the passed values are correct. " \
369  "To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. " \
370  "See documentation on how to use Visual C++ 'Checked Iterators'")
371 #else
372 #define _SCL_INSECURE_DEPRECATE_FN(_Func)
373 #endif
374 
375 #ifndef _SCL_SECURE_INVALID_PARAMETER
376  #define _SCL_SECURE_INVALID_PARAMETER(expr) _CRT_SECURE_INVALID_PARAMETER(expr)
377 #endif
378 
379  #define _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT _SCL_SECURE_INVALID_PARAMETER("invalid argument")
380  #define _SCL_SECURE_OUT_OF_RANGE_NO_ASSERT _SCL_SECURE_INVALID_PARAMETER("out of range")
381 
382  #define _SCL_SECURE_ALWAYS_VALIDATE(cond) \
383  { \
384  if (!(cond)) \
385  { \
386  _ASSERTE(#cond && 0); \
387  _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT; \
388  } \
389  _Analysis_assume_(cond); \
390  }
391 
392  #define _SCL_SECURE_CRT_VALIDATE(cond, retvalue) \
393  { \
394  if (!(cond)) \
395  { \
396  _ASSERTE(#cond && 0); \
397  _SCL_SECURE_INVALID_PARAMETER(cond); \
398  return (retvalue); \
399  } \
400  }
401 
402  #if _ITERATOR_DEBUG_LEVEL > 0
403 
404  #define _SCL_SECURE_VALIDATE(cond) \
405  { \
406  if (!(cond)) \
407  { \
408  _ASSERTE(#cond && 0); \
409  _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT; \
410  } \
411  _Analysis_assume_(cond); \
412  }
413 
414  #define _SCL_SECURE_VALIDATE_RANGE(cond) \
415  { \
416  if (!(cond)) \
417  { \
418  _ASSERTE(#cond && 0); \
419  _SCL_SECURE_OUT_OF_RANGE_NO_ASSERT; \
420  } \
421  _Analysis_assume_(cond); \
422  }
423 
424  #else /* _ITERATOR_DEBUG_LEVEL > 0 */
425 
426 /* when users disable _SECURE_SCL to get performance, we don't want analysis warnings from SCL headers */
427 #if _ITERATOR_DEBUG_LEVEL == 2
428  #define _SCL_SECURE_VALIDATE(cond) _Analysis_assume_(cond)
429  #define _SCL_SECURE_VALIDATE_RANGE(cond) _Analysis_assume_(cond)
430 #else
431  #define _SCL_SECURE_VALIDATE(cond)
432  #define _SCL_SECURE_VALIDATE_RANGE(cond)
433 #endif
434 
435  #endif /* _ITERATOR_DEBUG_LEVEL > 0 */
436 
437 #if __STDC_WANT_SECURE_LIB__
438 #define _CRT_SECURE_MEMCPY(dest, destsize, source, count) ::memcpy_s((dest), (destsize), (source), (count))
439 #define _CRT_SECURE_WMEMCPY(dest, destsize, source, count) ::wmemcpy_s((dest), (destsize), (source), (count))
440 #else
441 #define _CRT_SECURE_MEMCPY(dest, destsize, source, count) ::memcpy((dest), (source), (count))
442 #define _CRT_SECURE_WMEMCPY(dest, destsize, source, count) ::wmemcpy((dest), (source), (count))
443 #endif
444 
445 #include <use_ansi.h>
446 
447 #if defined(_M_CEE) && defined(_STATIC_CPPLIB)
448 #error _STATIC_CPPLIB is not supported while building with /clr or /clr:pure
449 #endif
450 
451 #if defined(_DLL) && defined(_STATIC_CPPLIB) && !defined(_DISABLE_DEPRECATE_STATIC_CPPLIB)
452 #pragma _CRT_WARNING("_STATIC_CPPLIB is deprecated")
453 #endif
454 
455 /* Define _CRTIMP2 */
456  #ifndef _CRTIMP2
457  #if defined(CRTDLL2) && defined(_CRTBLD)
458  #define _CRTIMP2 __declspec(dllexport)
459  #else /* ndef CRTDLL2 && _CRTBLD */
460 
461  #if defined(_DLL) && !defined(_STATIC_CPPLIB)
462  #define _CRTIMP2 __declspec(dllimport)
463 
464  #else /* ndef _DLL && !STATIC_CPPLIB */
465  #define _CRTIMP2
466  #endif /* _DLL && !STATIC_CPPLIB */
467 
468  #endif /* CRTDLL2 && _CRTBLD */
469  #endif /* _CRTIMP2 */
470 
471 /* Define _CRTIMP2_NCEEPURE */
472  #ifndef _CRTIMP2_NCEEPURE
473  #if defined(_M_CEE_PURE)
474  #define _CRTIMP2_NCEEPURE
475  #else
476  #define _CRTIMP2_NCEEPURE _CRTIMP2
477  #endif
478  #endif
479 
480  #ifndef _MRTIMP2_PURE
481  #if defined(_M_CEE_PURE)
482  #define _MRTIMP2_PURE
483  #else
484  #define _MRTIMP2_PURE _MRTIMP2
485  #endif
486  #endif
487 
488  #ifndef _MRTIMP2_PURE_NPURE
489  #if defined(_M_CEE_PURE)
490  #define _MRTIMP2_PURE_NPURE
491  #else
492  #define _MRTIMP2_PURE_NPURE _MRTIMP2_NPURE
493  #endif
494  #endif
495 
496 /* Define _MRTIMP2_NPURE */
497  #ifndef _MRTIMP2_NPURE
498  #if defined(MRTDLL) && defined(_CRTBLD)
499  #if !defined(_M_CEE_PURE)
500  #define _MRTIMP2_NPURE __declspec(dllexport)
501  #else
502  #define _MRTIMP2_NPURE
503  #endif
504  #else /* ndef MRTDLL && _CRTBLD */
505 
506  #if defined(_DLL) && defined(_M_CEE_PURE)
507  #define _MRTIMP2_NPURE __declspec(dllimport)
508 
509  #else
510  #define _MRTIMP2_NPURE
511  #endif
512 
513  #endif /* MRTDLL && _CRTBLD */
514  #endif /* _MRTIMP2_NPURE */
515 
516  #if defined(_DLL) && !defined(_STATIC_CPPLIB) && !defined(_M_CEE_PURE)
517  #define _DLL_CPPLIB
518  #endif
519 
520  #ifndef _CRTIMP2_PURE
521  #if defined(MRTDLL) && defined(_CRTBLD)
522  #define _CRTIMP2_PURE
523  #else
524  #ifdef _M_CEE_PURE
525  #define _CRTIMP2_PURE
526  #else
527  #define _CRTIMP2_PURE _CRTIMP2
528  #endif
529  #endif
530  #endif
531 
532  #ifdef _CRTBLD
533  #if !defined(_CRTDATA2)
534  #if !defined(MRTDLL)
535  #define _CRTDATA2 _CRTIMP2
536  #else
537  #define _CRTDATA2
538  #endif
539  #endif
540 
541 /* These functions are for enabling STATIC_CPPLIB functionality */
542  #define _cpp_stdin (__acrt_iob_func(0))
543  #define _cpp_stdout (__acrt_iob_func(1))
544  #define _cpp_stderr (__acrt_iob_func(2))
545  #define _cpp_isleadbyte(c) (__pctype_func()[(unsigned char)(c)] & _LEADBYTE)
546  #else /* _CRTBLD */
547  #if !defined(_CRTDATA2)
548  #define _CRTDATA2 _CRTIMP2
549  #endif
550  #endif /* _CRTBLD */
551 
552  /* NAMESPACE */
553 #define _STD_BEGIN namespace std {
554 #define _STD_END }
555 #define _STD ::std::
556 
557 /*
558 We use the stdext (standard extension) namespace to contain extensions that are not part of the current standard
559 */
560 #define _STDEXT_BEGIN namespace stdext {
561 #define _STDEXT_END }
562 #define _STDEXT ::stdext::
563 
564 #ifdef __cplusplus
565  #define _CSTD ::
566 
567  #define _EXTERN_C extern "C" {
568  #define _END_EXTERN_C }
569 #else /* ^^^ __cplusplus ^^^ // vvv !__cplusplus vvv */
570  #define _CSTD
571 
572  #define _EXTERN_C
573  #define _END_EXTERN_C
574 #endif /* __cplusplus */
575 
576  /* INTEGER PROPERTIES */
577 #define _MAX_EXP_DIG 8 /* for parsing numerics */
578 #define _MAX_INT_DIG 32
579 #define _MAX_SIG_DIG_V1 36
580 #define _MAX_SIG_DIG_V2 768
581 
582  /* STDIO PROPERTIES */
583 #define _Filet FILE
584 
585 #define _IOBASE _base
586 #define _IOPTR _ptr
587 #define _IOCNT _cnt
588 
589  /* MULTITHREAD PROPERTIES */
590  /* LOCK MACROS */
591 #define _LOCK_LOCALE 0
592 #define _LOCK_MALLOC 1
593 #define _LOCK_STREAM 2
594 #define _LOCK_DEBUG 3
595 #define _LOCK_AT_THREAD_EXIT 4
596 
597  #ifdef __cplusplus
599 enum _Uninitialized
600  { // tag for suppressing initialization
601  _Noinit
602  };
603 
604  // CLASS _Lockit
605 class _CRTIMP2_PURE _Lockit
606  { // lock while object in existence -- MUST NEST
607 public:
608  #if defined(_M_CEE_PURE) || defined(MRTDLL)
609  __CLR_OR_THIS_CALL _Lockit()
610  : _Locktype(0)
611  { // default construct
612  _Lockit_ctor(this);
613  }
614 
615  explicit __CLR_OR_THIS_CALL _Lockit(int _Kind)
616  { // set the lock
617  _Lockit_ctor(this, _Kind);
618  }
619 
620  __CLR_OR_THIS_CALL ~_Lockit() _NOEXCEPT
621  { // clear the lock
622  _Lockit_dtor(this);
623  }
624 
625  #else /* defined(_M_CEE_PURE) || defined(MRTDLL) */
626  __thiscall _Lockit(); // default construct
627  explicit __thiscall _Lockit(int); // set the lock
628  __thiscall ~_Lockit() _NOEXCEPT; // clear the lock
629  #endif /* defined(_M_CEE_PURE) || defined(MRTDLL) */
630 
631  static _MRTIMP2_NPURE void __cdecl _Lockit_ctor(int);
632  static _MRTIMP2_NPURE void __cdecl _Lockit_dtor(int);
633 
634 private:
635  static _MRTIMP2_NPURE void __cdecl _Lockit_ctor(_Lockit *);
636  static _MRTIMP2_NPURE void __cdecl _Lockit_ctor(_Lockit *, int);
637  static _MRTIMP2_NPURE void __cdecl _Lockit_dtor(_Lockit *);
638 
639 public:
640  __CLR_OR_THIS_CALL _Lockit(const _Lockit&) = delete;
641  _Lockit& __CLR_OR_THIS_CALL operator=(const _Lockit&) = delete;
642 
643 private:
644  int _Locktype;
645  };
646 
647  #ifdef _M_CEE
648 class _CRTIMP2_PURE _EmptyLockit
649  { // empty lock class used for bin compat
650 private:
651  int _Locktype;
652  };
653 
654  #if defined(__cplusplus_cli)
655  #define _M_CEE_FINALLY finally
656  #else /* defined(__cplusplus_cli) */
657  #define _M_CEE_FINALLY __finally
658  #endif /* defined(__cplusplus_cli) */
659 
660  #define _BEGIN_LOCK(_Kind) \
661  { \
662  typedef int _TmpTestType; \
663  __if_exists(_TmpTestType::ToString) \
664  { \
665  bool _MustReleaseLock = false; \
666  int _LockKind = _Kind; \
667  System::Runtime::CompilerServices::RuntimeHelpers::PrepareConstrainedRegions(); \
668  try \
669  } \
670  { \
671  __if_exists(_TmpTestType::ToString) \
672  { \
673  System::Runtime::CompilerServices::RuntimeHelpers::PrepareConstrainedRegions(); \
674  try { } _M_CEE_FINALLY \
675  { \
676  _STD _Lockit::_Lockit_ctor(_LockKind); \
677  _MustReleaseLock = true; \
678  } \
679  } \
680  __if_not_exists(_TmpTestType::ToString) \
681  { \
682  _STD _Lockit _Lock(_Kind); \
683  }
684 
685  #define _END_LOCK() \
686  } \
687  __if_exists(_TmpTestType::ToString) \
688  { \
689  _M_CEE_FINALLY \
690  { \
691  if (_MustReleaseLock) \
692  { \
693  _STD _Lockit::_Lockit_dtor(_LockKind); \
694  } \
695  } \
696  } \
697  }
698 
699  #define _BEGIN_LOCINFO(_VarName) \
700  _BEGIN_LOCK(_LOCK_LOCALE) \
701  _Locinfo _VarName;
702 
703  #define _END_LOCINFO() \
704  _END_LOCK()
705 
706  #define _RELIABILITY_CONTRACT \
707  [System::Runtime::ConstrainedExecution::ReliabilityContract( \
708  System::Runtime::ConstrainedExecution::Consistency::WillNotCorruptState, \
709  System::Runtime::ConstrainedExecution::Cer::Success)]
710 
711  #else /* _M_CEE */
712  #define _BEGIN_LOCK(_Kind) \
713  { \
714  _STD _Lockit _Lock(_Kind);
715 
716  #define _END_LOCK() \
717  }
718 
719  #define _BEGIN_LOCINFO(_VarName) \
720  { \
721  _Locinfo _VarName;
722 
723  #define _END_LOCINFO() \
724  }
725 
726  #define _RELIABILITY_CONTRACT
727  #endif /* _M_CEE */
728 
729 class _CRTIMP2_PURE _Init_locks
730  { // initialize mutexes
731 public:
732  #if defined(_M_CEE_PURE) || defined(MRTDLL)
733  __CLR_OR_THIS_CALL _Init_locks()
734  { // default construct
735  _Init_locks_ctor(this);
736  }
737 
738  __CLR_OR_THIS_CALL ~_Init_locks() _NOEXCEPT
739  { // destroy the object
740  _Init_locks_dtor(this);
741  }
742 
743  #else /* defined(_M_CEE_PURE) || defined(MRTDLL) */
744  __thiscall _Init_locks();
745  __thiscall ~_Init_locks() _NOEXCEPT;
746  #endif /* defined(_M_CEE_PURE) || defined(MRTDLL) */
747 
748 private:
749  static _MRTIMP2_NPURE void __cdecl _Init_locks_ctor(_Init_locks *);
750  static _MRTIMP2_NPURE void __cdecl _Init_locks_dtor(_Init_locks *);
751  };
752 
753 _STD_END
754  #endif /* __cplusplus */
755 
756 #ifndef _RELIABILITY_CONTRACT
757  #define _RELIABILITY_CONTRACT
758 #endif /* _RELIABILITY_CONTRACT */
759 
760  /* MISCELLANEOUS MACROS AND TYPES */
761 _MRTIMP2 void __cdecl _Atexit(void (__cdecl *)(void));
762 
763 typedef unsigned long _Uint32t;
764 
765 #define _Mbstinit(x) mbstate_t x = {}
766 
767  #pragma pop_macro("new")
768  #pragma warning(pop)
769  #pragma pack(pop)
770 #endif /* RC_INVOKED */
771 #endif /* _YVALS */
772 
773 /*
774  * Copyright (c) by P.J. Plauger. All rights reserved.
775  * Consult your license regarding permissions and restrictions.
776 V6.50:0009 */
_Variant_copymove_layer_ & operator=(_Variant_copymove_layer_ &&_That) _NOEXCEPT_OP((conjunction< is_nothrow_move_constructible< _Types >...
_MRTIMP2 void __cdecl _Atexit(void(__cdecl *)(void))
#define _STD_BEGIN
Definition: yvals.h:553
#define _MRTIMP2
Definition: crtdefs.h:62
unsigned long _Uint32t
Definition: yvals.h:763
#define _NOEXCEPT
Definition: yvals.h:84
#define __CLR_OR_THIS_CALL
Definition: vcruntime.h:147
#define _STD_END
Definition: yvals.h:554
#define _MRTIMP2_NPURE
Definition: yvals.h:510
#define _CRTIMP2_PURE
Definition: yvals.h:527