码迷,mamicode.com
首页 > 其他好文 > 详细

VS10异常.[_ITERATOR_DEBUG_LEVEL][_HAS_ITERATOR_DEBUGGING]

时间:2019-01-17 13:56:49      阅读:429      评论:0      收藏:0      [点我收藏+]

标签:ext   can   oid   char   inspect   mic   scl   忘记   __int64   

1、今天(20190117)在编译 Debug版本的时候 报错:

  qtmaind.lib(qtmain_win.obj):-1: error: LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“2”不匹配值“0”(main.obj 中)

  ZC:我记得是 在之前的项目中 使用 C++ STL 容器的时候,Debug版本的哪个容器 有BUG。

  ZC:然后 忘了把这个问题记录在哪里了... 只记得 改了某个 文件...

  ZC:于是 用 EditPlus 搜索了 VS10的安装目录,找到了 是 文件“C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\yvals.h”,之前 对该文件有备份。通过 WinMerge对比,发现 我是把 其中的一句“#define _HAS_ITERATOR_DEBUGGING 1”改成了“#define _HAS_ITERATOR_DEBUGGING 0”(仅这一处不同),把它换回去 就OK了。

 

2、我做的文件修改,内容保存如下(以免重装系统 忘记备份) --> 做修改的是 第157行 的地方

  1 /* yvals.h values header for Microsoft C/C++ */
  2 #pragma once
  3 #ifndef _YVALS
  4 #define _YVALS
  5 
  6 #include <crtdefs.h>
  7 
  8 #pragma pack(push,_CRT_PACKING)
  9 
 10 #define _CPPLIB_VER    520
 11 
 12 #define _ALLOW_KEYWORD_MACROS    // TRANSITION
 13 #ifndef _ALLOW_KEYWORD_MACROS
 14  #include <xkeycheck.h>
 15 #endif /* _ALLOW_KEYWORD_MACROS */
 16 
 17 #ifndef _HAS_CPP0X
 18  #define _HAS_CPP0X     1
 19 #endif
 20 
 21 #define _HAS_TR1    1    /* enable TR1 extensions */
 22 
 23 /* Note on use of "deprecate":
 24  * Various places in this header and other headers use __declspec(deprecate) or macros that have the term DEPRECATE in them.
 25  * We use deprecate here ONLY to signal the compiler to emit a warning about these items. The use of deprecate
 26  * should NOT be taken to imply that any standard committee has deprecated these functions from the relevant standards.
 27  * In fact, these functions are NOT deprecated from the standard.
 28  *
 29  * Full details can be found in our documentation by searching for "Checked Iterators".
 30 */
 31 
 32 #define __PURE_APPDOMAIN_GLOBAL
 33 
 34 #ifndef __CRTDECL
 35 #if defined(_M_CEE_PURE) || defined(MRTDLL)
 36 #define __CRTDECL   __clrcall
 37 #else
 38 #define __CRTDECL   __cdecl
 39 #endif
 40 #endif
 41 
 42 #ifndef __CLR_OR_THIS_CALL
 43 #if defined(MRTDLL) || defined(_M_CEE_PURE)
 44 #define __CLR_OR_THIS_CALL  __clrcall
 45 #else
 46 #define __CLR_OR_THIS_CALL
 47 #endif
 48 #endif
 49 
 50 #ifndef __CLRCALL_OR_CDECL
 51 #if defined(MRTDLL) || defined(_M_CEE_PURE)
 52 #define __CLRCALL_OR_CDECL __clrcall
 53 #else
 54 #define __CLRCALL_OR_CDECL __cdecl
 55 #endif
 56 #endif
 57 
 58 #ifndef __CLRCALL_PURE_OR_CDECL
 59 #if defined(_M_CEE_PURE)
 60 #define __CLRCALL_PURE_OR_CDECL __clrcall
 61 #else
 62 #define __CLRCALL_PURE_OR_CDECL __cdecl
 63 #endif
 64 #endif
 65 
 66         /* CURRENT DLL NAMES */
 67 #ifndef _CRT_MSVCP_CURRENT
 68 #ifdef _DEBUG
 69 #define _CRT_MSVCP_CURRENT "MSVCP100D.dll"
 70 #else
 71 #define _CRT_MSVCP_CURRENT "MSVCP100.dll"
 72 #endif
 73 #endif
 74 
 75         /* NAMING PROPERTIES */
 76 #define _WIN32_C_LIB    1
 77 
 78         /* THREAD AND LOCALE CONTROL */
 79 #define _MULTI_THREAD    1    /* nontrivial locks if multithreaded */
 80 #define _IOSTREAM_OP_LOCKS    1    /* lock iostream operations */
 81 #define _GLOBAL_LOCALE    0    /* 0 for per-thread locales, 1 for shared */
 82 
 83         /* THREAD-LOCAL STORAGE */
 84 #define _COMPILER_TLS    1    /* 1 if compiler supports TLS directly */
 85  #if _MULTI_THREAD
 86   #define _TLS_QUAL    __declspec(thread)    /* TLS qualifier, if any */
 87 
 88  #else /* _MULTI_THREAD */
 89   #define _TLS_QUAL
 90  #endif /* _MULTI_THREAD */
 91 
 92  #ifndef _HAS_EXCEPTIONS
 93   #define  _HAS_EXCEPTIONS  1    /* predefine as 0 to disable exceptions */
 94  #endif /* _HAS_EXCEPTIONS */
 95 
 96 #ifndef _HAS_STRICT_CONFORMANCE
 97  #define _HAS_STRICT_CONFORMANCE 0
 98 #endif /* _HAS_STRICT_CONFORMANCE */
 99 
100  #ifndef _HAS_TR1_IMPORTS
101   #define _HAS_TR1_IMPORTS    _HAS_CPP0X
102  #endif
103 
104 #define _GLOBAL_USING    1
105 
106 
107 #ifdef _ITERATOR_DEBUG_LEVEL /* A. _ITERATOR_DEBUG_LEVEL is already defined. */
108 
109     /* A1. Validate _ITERATOR_DEBUG_LEVEL. */
110     #if _ITERATOR_DEBUG_LEVEL > 2 && defined(_DEBUG)
111         #error _ITERATOR_DEBUG_LEVEL > 2 is not supported in debug mode.
112     #elif _ITERATOR_DEBUG_LEVEL > 1 && !defined(_DEBUG)
113         #error _ITERATOR_DEBUG_LEVEL > 1 is not supported in release mode.
114     #endif
115 
116     /* A2. Inspect _HAS_ITERATOR_DEBUGGING. */
117     #ifdef _HAS_ITERATOR_DEBUGGING /* A2i. _HAS_ITERATOR_DEBUGGING is already defined, validate it. */
118         #if _ITERATOR_DEBUG_LEVEL == 2 && _HAS_ITERATOR_DEBUGGING != 1
119             #error _ITERATOR_DEBUG_LEVEL == 2 must imply _HAS_ITERATOR_DEBUGGING == 1 .
120         #elif _ITERATOR_DEBUG_LEVEL < 2 && _HAS_ITERATOR_DEBUGGING != 0
121             #error _ITERATOR_DEBUG_LEVEL < 2 must imply _HAS_ITERATOR_DEBUGGING == 0 .
122         #endif
123     #else /* A2ii. _HAS_ITERATOR_DEBUGGING is not yet defined, derive it. */
124         #if _ITERATOR_DEBUG_LEVEL == 2
125             #define _HAS_ITERATOR_DEBUGGING 1
126         #else
127             #define _HAS_ITERATOR_DEBUGGING 0
128         #endif
129     #endif /* _HAS_ITERATOR_DEBUGGING */
130 
131     /* A3. Inspect _SECURE_SCL. */
132     #ifdef _SECURE_SCL /* A3i. _SECURE_SCL is already defined, validate it. */
133         #if _ITERATOR_DEBUG_LEVEL > 0 && _SECURE_SCL != 1
134             #error _ITERATOR_DEBUG_LEVEL > 0 must imply _SECURE_SCL == 1 .
135         #elif _ITERATOR_DEBUG_LEVEL == 0 && _SECURE_SCL != 0
136             #error _ITERATOR_DEBUG_LEVEL == 0 must imply _SECURE_SCL == 0 .
137         #endif
138     #else /* A3ii. _SECURE_SCL is not yet defined, derive it. */
139         #if _ITERATOR_DEBUG_LEVEL > 0
140             #define _SECURE_SCL 1
141         #else
142             #define _SECURE_SCL 0
143         #endif
144     #endif /* _SECURE_SCL */
145 
146 #else /* B. _ITERATOR_DEBUG_LEVEL is not yet defined. */
147 
148     /* B1. Inspect _HAS_ITERATOR_DEBUGGING. */
149     #ifdef _HAS_ITERATOR_DEBUGGING /* B1i. _HAS_ITERATOR_DEBUGGING is already defined, validate it. */
150         #if _HAS_ITERATOR_DEBUGGING > 1
151             #error _HAS_ITERATOR_DEBUGGING must be either 0 or 1 .
152         #elif _HAS_ITERATOR_DEBUGGING == 1 && !defined(_DEBUG)
153             #error _HAS_ITERATOR_DEBUGGING == 1 is not supported in release mode.
154         #endif
155     #else /* B1ii. _HAS_ITERATOR_DEBUGGING is not yet defined, default it. */
156         #ifdef _DEBUG
157             #define _HAS_ITERATOR_DEBUGGING 1// ZC: 修改的是这里,将它改为了“#define _HAS_ITERATOR_DEBUGGING 0”
158         #else
159             #define _HAS_ITERATOR_DEBUGGING 0
160         #endif
161     #endif /* _HAS_ITERATOR_DEBUGGING */
162 
163     /* B2. Inspect _SECURE_SCL. */
164     #ifdef _SECURE_SCL /* B2i. _SECURE_SCL is already defined, validate it. */
165         #if _SECURE_SCL > 1
166             #error _SECURE_SCL must be either 0 or 1 .
167         #endif
168     #else /* B2ii. _SECURE_SCL is not yet defined, default it. */
169         #if _HAS_ITERATOR_DEBUGGING == 1
170             #define _SECURE_SCL 1
171         #else
172             #define _SECURE_SCL 0
173         #endif
174     #endif /* _SECURE_SCL */
175 
176     /* B3. Derive _ITERATOR_DEBUG_LEVEL. */
177     #if _HAS_ITERATOR_DEBUGGING
178         #define _ITERATOR_DEBUG_LEVEL 2
179     #elif _SECURE_SCL
180         #define _ITERATOR_DEBUG_LEVEL 1
181     #else
182         #define _ITERATOR_DEBUG_LEVEL 0
183     #endif
184 
185 #endif /* _ITERATOR_DEBUG_LEVEL */
186 
187 
188 #if defined(_CRTBLD) && defined(_DLL)
189     #define _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH
190 #endif
191 
192 #ifdef __cplusplus
193     #ifndef _ALLOW_MSC_VER_MISMATCH
194         #pragma detect_mismatch("_MSC_VER", "1600")
195     #endif /* _ALLOW_MSC_VER_MISMATCH */
196 
197     #ifndef _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH
198         #if _ITERATOR_DEBUG_LEVEL == 0
199              #pragma detect_mismatch("_ITERATOR_DEBUG_LEVEL", "0")
200         #elif _ITERATOR_DEBUG_LEVEL == 1
201              #pragma detect_mismatch("_ITERATOR_DEBUG_LEVEL", "1")
202         #elif _ITERATOR_DEBUG_LEVEL == 2
203              #pragma detect_mismatch("_ITERATOR_DEBUG_LEVEL", "2")
204         #else
205              #error Unrecognized _ITERATOR_DEBUG_LEVEL value.
206         #endif
207     #endif /* _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH */
208 #endif /* __cplusplus */
209 
210 
211 /* See note on use of deprecate at the top of this file */
212 #if !defined(_SCL_SECURE_NO_WARNINGS) && defined(_SCL_SECURE_NO_DEPRECATE)
213 #define _SCL_SECURE_NO_WARNINGS
214 #endif
215 
216 #if !defined (_SECURE_SCL_DEPRECATE)
217 #if defined(_SCL_SECURE_NO_WARNINGS)
218 #define _SECURE_SCL_DEPRECATE 0
219 #else
220 #define _SECURE_SCL_DEPRECATE 1
221 #endif
222 #endif
223 
224 #if !defined (_SECURE_SCL_THROWS)
225 #define _SECURE_SCL_THROWS 0
226 #endif
227 
228 /* _SECURE_SCL switches: helper macros */
229 /* See note on use of deprecate at the top of this file */
230 
231 #if _ITERATOR_DEBUG_LEVEL > 0 && _SECURE_SCL_DEPRECATE
232 #define _SCL_INSECURE_DEPRECATE 233     _CRT_DEPRECATE_TEXT( 234         "Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. " 235         "To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ ‘Checked Iterators‘")
236 #else
237 #define _SCL_INSECURE_DEPRECATE
238 #endif
239 
240 
241 #ifndef _SCL_SECURE_INVALID_PARAMETER
242  #define _SCL_SECURE_INVALID_PARAMETER(expr) _CRT_SECURE_INVALID_PARAMETER(expr)
243 #endif
244 
245 
246  #if _SECURE_SCL_THROWS
247 
248  #ifndef _SILENCE_DEPRECATION_OF_SECURE_SCL_THROWS
249   #include <crtwrn.h>
250   #pragma push_macro("_SECURE_SCL_THROWS")
251   #undef _SECURE_SCL_THROWS
252   #pragma _CRT_WARNING( _DEPRECATE_SECURE_SCL_THROWS )
253   #pragma pop_macro("_SECURE_SCL_THROWS")
254  #endif /* _SILENCE_DEPRECATION_OF_SECURE_SCL_THROWS */
255 
256  #define _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT        _STD _Xinvalid_argument("invalid argument")
257  #define _SCL_SECURE_OUT_OF_RANGE_NO_ASSERT            _STD _Xout_of_range("out of range")
258 
259  #else /* _SECURE_SCL_THROWS */
260 
261  #define _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT        _SCL_SECURE_INVALID_PARAMETER("invalid argument")
262  #define _SCL_SECURE_OUT_OF_RANGE_NO_ASSERT            _SCL_SECURE_INVALID_PARAMETER("out of range")
263 
264  #endif /* _SECURE_SCL_THROWS */
265 
266  #define _SCL_SECURE_ALWAYS_VALIDATE(cond)                267     {                                                    268         if (!(cond))                                    269         {                                                270             _ASSERTE(#cond && 0);                        271             _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT;        272         }                                                273         __analysis_assume(cond);                        274     }
275 
276  #define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)        277     {                                                    278         if (!(cond))                                    279         {                                                280             _ASSERTE(#cond && 0);                        281             _SCL_SECURE_OUT_OF_RANGE_NO_ASSERT;            282         }                                                283         __analysis_assume(cond);                        284     }
285 
286  #define _SCL_SECURE_CRT_VALIDATE(cond, retvalue)        287     {                                                    288         if (!(cond))                                    289         {                                                290             _ASSERTE(#cond && 0);                        291             _SCL_SECURE_INVALID_PARAMETER(cond);        292             return (retvalue);                            293         }                                                294     }
295 
296  #if _ITERATOR_DEBUG_LEVEL > 0
297 
298  #define _SCL_SECURE_VALIDATE(cond)                        299     {                                                    300         if (!(cond))                                    301         {                                                302             _ASSERTE(#cond && 0);                        303             _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT;        304         }                                                305         __analysis_assume(cond);                        306     }
307 
308  #define _SCL_SECURE_VALIDATE_RANGE(cond)                309     {                                                    310         if (!(cond))                                    311         {                                                312             _ASSERTE(#cond && 0);                        313             _SCL_SECURE_OUT_OF_RANGE_NO_ASSERT;            314         }                                                315         __analysis_assume(cond);                        316     }
317 
318  #define _SCL_SECURE_INVALID_ARGUMENT                    319     {                                                    320         _ASSERTE("Standard C++ Libraries Invalid Argument" && 0); 321         _SCL_SECURE_INVALID_ARGUMENT_NO_ASSERT;            322     }
323  #define _SCL_SECURE_OUT_OF_RANGE                        324     {                                                    325         _ASSERTE("Standard C++ Libraries Out of Range" && 0); 326         _SCL_SECURE_OUT_OF_RANGE_NO_ASSERT;                327     }
328 
329  #else /* _ITERATOR_DEBUG_LEVEL > 0 */
330  
331 /* when users disable _SECURE_SCL to get performance, we don‘t want analysis warnings from SCL headers */
332 #if _ITERATOR_DEBUG_LEVEL == 2
333  #define _SCL_SECURE_VALIDATE(cond)            __analysis_assume(cond)
334  #define _SCL_SECURE_VALIDATE_RANGE(cond)    __analysis_assume(cond)
335 #else
336  #define _SCL_SECURE_VALIDATE(cond)
337  #define _SCL_SECURE_VALIDATE_RANGE(cond)
338 #endif
339 
340  #define _SCL_SECURE_INVALID_ARGUMENT 
341  #define _SCL_SECURE_OUT_OF_RANGE 
342 
343  #endif /* _ITERATOR_DEBUG_LEVEL > 0 */
344 
345 #if __STDC_WANT_SECURE_LIB__
346 #define _CRT_SECURE_MEMCPY(dest, destsize, source, count) ::memcpy_s((dest), (destsize), (source), (count))
347 #define _CRT_SECURE_MEMMOVE(dest, destsize, source, count) ::memmove_s((dest), (destsize), (source), (count))
348 #define _CRT_SECURE_WMEMCPY(dest, destsize, source, count) ::wmemcpy_s((dest), (destsize), (source), (count))
349 #define _CRT_SECURE_WMEMMOVE(dest, destsize, source, count) ::wmemmove_s((dest), (destsize), (source), (count))
350 #else
351 #define _CRT_SECURE_MEMCPY(dest, destsize, source, count) ::memcpy((dest), (source), (count))
352 #define _CRT_SECURE_MEMMOVE(dest, destsize, source, count) ::memmove((dest), (source), (count))
353 #define _CRT_SECURE_WMEMCPY(dest, destsize, source, count) ::wmemcpy((dest), (source), (count))
354 #define _CRT_SECURE_WMEMMOVE(dest, destsize, source, count) ::wmemmove((dest), (source), (count))
355 #endif
356 
357 #include <use_ansi.h>
358 
359 #if defined(_M_CEE) && defined(_STATIC_CPPLIB)
360 #include <crtwrn.h>
361 #pragma push_macro("_STATIC_CPPLIB")
362 #undef _STATIC_CPPLIB
363 #pragma _CRT_WARNING( _CLR_AND_STATIC_CPPLIB )
364 #pragma pop_macro("_STATIC_CPPLIB")
365 #endif
366 
367 #if defined(_DLL) && defined(_STATIC_CPPLIB) && !defined(_DISABLE_DEPRECATE_STATIC_CPPLIB)
368 #include <crtwrn.h>
369 #pragma push_macro("_STATIC_CPPLIB")
370 #undef _STATIC_CPPLIB
371 #pragma _CRT_WARNING( _DEPRECATE_STATIC_CPPLIB )
372 #pragma pop_macro("_STATIC_CPPLIB")
373 #endif
374 
375 /* Define _CRTIMP2 */
376  #ifndef _CRTIMP2
377 
378    #if defined(_DLL) && !defined(_STATIC_CPPLIB)
379     #define _CRTIMP2    __declspec(dllimport)
380 
381    #else   /* ndef _DLL && !STATIC_CPPLIB */
382     #define _CRTIMP2
383    #endif  /* _DLL && !STATIC_CPPLIB */
384 
385  #endif  /* _CRTIMP2 */
386 
387 /* Define _CRTIMP2_NCEEPURE */
388  #ifndef _CRTIMP2_NCEEPURE
389   #if defined(_M_CEE_PURE)
390    #define _CRTIMP2_NCEEPURE
391   #else
392    #define _CRTIMP2_NCEEPURE _CRTIMP2
393   #endif
394  #endif
395 
396 #ifndef _MRTIMP
397     #define _MRTIMP __declspec(dllimport)
398 #endif  /* _MRTIMP */
399 
400 /* Define _MRTIMP2 */
401  #ifndef _MRTIMP2
402 
403    #if defined(_DLL) && !defined(_STATIC_CPPLIB)
404     #define _MRTIMP2    __declspec(dllimport)
405 
406    #else   /* ndef _DLL && !STATIC_CPPLIB */
407     #define _MRTIMP2
408    #endif  /* _DLL && !STATIC_CPPLIB */
409 
410  #endif  /* _MRTIMP2 */
411 
412  #ifndef _MRTIMP2_PURE
413   #if defined(_M_CEE_PURE)
414    #define _MRTIMP2_PURE
415   #else
416    #define _MRTIMP2_PURE _MRTIMP2
417   #endif
418  #endif
419 
420  #ifndef _MRTIMP2_PURE_NPURE
421   #if defined(_M_CEE_PURE)
422    #define _MRTIMP2_PURE_NPURE
423   #else
424    #define _MRTIMP2_PURE_NPURE _MRTIMP2_NPURE
425   #endif
426  #endif
427 
428 /* Define _MRTIMP2_NPURE */
429  #ifndef _MRTIMP2_NPURE
430 
431    #if defined(_DLL) && defined(_M_CEE_PURE)
432     #define _MRTIMP2_NPURE    __declspec(dllimport)
433 
434    #else
435     #define _MRTIMP2_NPURE
436    #endif
437 
438  #endif  /* _MRTIMP2_NPURE */
439 
440 /* Define _MRTIMP2_NCEE */
441  #ifndef _MRTIMP2_NCEE
442   #if defined(_M_CEE)
443    #define _MRTIMP2_NCEE
444   #else
445    #define _MRTIMP2_NCEE _MRTIMP2
446   #endif
447  #endif
448 
449 /* Define _MRTIMP2_NCEEPURE */
450  #ifndef _MRTIMP2_NCEEPURE
451   #if defined(_M_CEE_PURE)
452    #define _MRTIMP2_NCEEPURE
453   #else
454    #define _MRTIMP2_NCEEPURE _MRTIMP2
455   #endif
456  #endif
457 
458 /* Define _MRTIMP2_NPURE_NCEEPURE */
459  #ifndef _MRTIMP2_NPURE_NCEEPURE
460   #if defined(_M_CEE_PURE)
461    #define _MRTIMP2_NPURE_NCEEPURE
462   #else
463    #define _MRTIMP2_NPURE_NCEEPURE _MRTIMP2_NPURE
464   #endif
465  #endif
466 
467  #if defined(_DLL) && !defined(_STATIC_CPPLIB) && !defined(_M_CEE_PURE)
468   #define _DLL_CPPLIB
469  #endif
470 
471  #ifndef _CRTIMP2_PURE
472    #ifdef  _M_CEE_PURE
473      #define _CRTIMP2_PURE
474    #else
475      #define _CRTIMP2_PURE _CRTIMP2
476    #endif
477  #endif
478 
479 #if !defined(_CRTDATA2)
480     #define _CRTDATA2 _CRTIMP2
481 #endif
482 
483 
484 
485         /* NAMESPACE */
486 
487  #if defined(__cplusplus)
488   #define _STD_BEGIN    namespace std {
489   #define _STD_END        }
490   #define _STD    ::std::
491 
492 /*
493 We use the stdext (standard extension) namespace to contain extensions that are not part of the current standard
494 */
495   #define _STDEXT_BEGIN        namespace stdext {
496   #define _STDEXT_END        }
497   #define _STDEXT            ::stdext::
498 
499   #ifdef _STD_USING
500    #define _C_STD_BEGIN    namespace std {    /* only if *.c compiled as C++ */
501    #define _C_STD_END    }
502    #define _CSTD    ::std::
503 
504   #else /* _STD_USING */
505 /* #define _GLOBAL_USING    *.h in global namespace, c* imports to std */
506 
507    #define _C_STD_BEGIN
508    #define _C_STD_END
509    #define _CSTD    ::
510   #endif /* _STD_USING */
511 
512   #define _C_LIB_DECL        extern "C" {    /* C has extern "C" linkage */
513   #define _END_C_LIB_DECL    }
514   #define _EXTERN_C            extern "C" {
515   #define _END_EXTERN_C        }
516 
517  #else /* __cplusplus */
518   #define _STD_BEGIN
519   #define _STD_END
520   #define _STD
521 
522   #define _C_STD_BEGIN
523   #define _C_STD_END
524   #define _CSTD
525 
526   #define _C_LIB_DECL
527   #define _END_C_LIB_DECL
528   #define _EXTERN_C
529   #define _END_EXTERN_C
530  #endif /* __cplusplus */
531 
532  #define _Restrict    restrict
533 
534  #ifdef __cplusplus
535 _STD_BEGIN
536 typedef bool _Bool;
537 _STD_END
538  #endif /* __cplusplus */
539 
540         /* VC++ COMPILER PARAMETERS */
541 #define _LONGLONG    __int64
542 #define _ULONGLONG    unsigned __int64
543 #define _LLONG_MAX    0x7fffffffffffffff
544 #define _ULLONG_MAX    0xffffffffffffffff
545 
546         /* INTEGER PROPERTIES */
547 #define _C2            1    /* 0 if not 2‘s complement */
548 
549 #define _MAX_EXP_DIG    8    /* for parsing numerics */
550 #define _MAX_INT_DIG    32
551 #define _MAX_SIG_DIG    36
552 
553 typedef _LONGLONG _Longlong;
554 typedef _ULONGLONG _ULonglong;
555 
556         /* STDIO PROPERTIES */
557 #define _Filet _iobuf
558 
559  #ifndef _FPOS_T_DEFINED
560   #define _FPOSOFF(fp)    ((long)(fp))
561  #endif /* _FPOS_T_DEFINED */
562 
563 #define _IOBASE    _base
564 #define _IOPTR    _ptr
565 #define _IOCNT    _cnt
566 
567 #ifndef _HAS_CHAR16_T_LANGUAGE_SUPPORT
568  #define _HAS_CHAR16_T_LANGUAGE_SUPPORT 0
569 #endif /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */
570 
571         /* uchar PROPERTIES */
572  #if _HAS_CHAR16_T_LANGUAGE_SUPPORT
573  #else /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */
574  #if !defined(_CHAR16T)
575   #define _CHAR16T
576 typedef unsigned short char16_t;
577 typedef unsigned int char32_t;
578  #endif /* !defined(_CHAR16T) */
579 
580  #endif /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */
581 
582         /* MULTITHREAD PROPERTIES */
583         /* LOCK MACROS */
584 #define _LOCK_LOCALE    0
585 #define _LOCK_MALLOC    1
586 #define _LOCK_STREAM    2
587 #define _LOCK_DEBUG        3
588 #define _MAX_LOCK        4    /* one more than highest lock number */
589 
590  #ifdef __cplusplus
591 _STD_BEGIN
592 enum _Uninitialized
593     {    // tag for suppressing initialization
594     _Noinit
595     };
596 
597         // CLASS _Lockit
598 // warning 4412 is benign here
599 #pragma warning(push)
600 #pragma warning(disable:4412)
601 class _CRTIMP2_PURE _Lockit
602     {    // lock while object in existence -- MUST NEST
603 public:
604  #if _MULTI_THREAD
605 
606   #if defined(_M_CEE_PURE) || defined(MRTDLL)
607     __CLR_OR_THIS_CALL _Lockit()
608         : _Locktype(0)
609         {    // default construct
610         _Lockit_ctor(this);
611         }
612 
613     explicit __CLR_OR_THIS_CALL _Lockit(int _Kind)
614         {    // set the lock
615         _Lockit_ctor(this, _Kind);
616         }
617 
618     __CLR_OR_THIS_CALL ~_Lockit()
619         {    // clear the lock
620         _Lockit_dtor(this);
621         }
622 
623   #else /* defined(_M_CEE_PURE) || defined(MRTDLL) */
624     __thiscall _Lockit();    // default construct
625     explicit __thiscall _Lockit(int);    // set the lock
626     __thiscall ~_Lockit();    // clear the lock
627   #endif /* defined(_M_CEE_PURE) || defined(MRTDLL) */
628 
629     static _MRTIMP2_NPURE void __cdecl _Lockit_ctor(int);
630     static _MRTIMP2_NPURE void __cdecl _Lockit_dtor(int);
631 
632 private:
633     static _MRTIMP2_NPURE void __cdecl _Lockit_ctor(_Lockit *);
634     static _MRTIMP2_NPURE void __cdecl _Lockit_ctor(_Lockit *, int);
635     static _MRTIMP2_NPURE void __cdecl _Lockit_dtor(_Lockit *);
636 
637     __CLR_OR_THIS_CALL _Lockit(const _Lockit&);                // not defined
638     _Lockit& __CLR_OR_THIS_CALL operator=(const _Lockit&);    // not defined
639 
640     int _Locktype;
641 
642   #else /* _MULTI_THREAD */
643     _Lockit()
644         {    // do nothing
645         }
646 
647     explicit _Lockit(int)
648         {    // do nothing
649         }
650 
651     ~_Lockit()
652         {    // do nothing
653         }
654   #endif /* _MULTI_THREAD */
655     };
656 
657  #ifdef _M_CEE
658 class _CRTIMP2_PURE _EmptyLockit
659     {    // empty lock class used for bin compat
660 public:
661   #if _MULTI_THREAD
662 private:
663     int _Locktype;
664   #endif /* _MULTI_THREAD */
665     };
666 
667   #if defined(__cplusplus_cli)
668    #define _M_CEE_FINALLY finally
669   #else /* defined(__cplusplus_cli) */
670    #define _M_CEE_FINALLY __finally
671   #endif /* defined(__cplusplus_cli) */
672 
673   #define _BEGIN_LOCK(_Kind) 674     { 675         typedef int _TmpTestType; 676         __if_exists(_TmpTestType::ToString) 677         { 678         bool _MustReleaseLock = false; 679         int _LockKind = _Kind; 680         System::Runtime::CompilerServices::RuntimeHelpers::PrepareConstrainedRegions(); 681         try 682         } 683         { 684             __if_exists(_TmpTestType::ToString) 685             { 686             System::Runtime::CompilerServices::RuntimeHelpers::PrepareConstrainedRegions(); 687             try { } _M_CEE_FINALLY 688             { 689                 _STD _Lockit::_Lockit_ctor(_LockKind); 690                 _MustReleaseLock = true; 691             } 692             } 693             __if_not_exists(_TmpTestType::ToString) 694             { 695             _STD _Lockit _Lock(_Kind); 696             }
697 
698   #define _END_LOCK() 699         } 700         __if_exists(_TmpTestType::ToString) 701         { 702         _M_CEE_FINALLY 703         { 704             if (_MustReleaseLock) 705             { 706                 _STD _Lockit::_Lockit_dtor(_LockKind); 707             } 708         } 709         } 710     }
711 
712   #define _BEGIN_LOCINFO(_VarName) 713     _BEGIN_LOCK(_LOCK_LOCALE) 714     _Locinfo _VarName;
715 
716   #define _END_LOCINFO() 717     _END_LOCK() 718 
719   #define _RELIABILITY_CONTRACT 720     [System::Runtime::ConstrainedExecution::ReliabilityContract( 721         System::Runtime::ConstrainedExecution::Consistency::WillNotCorruptState, 722         System::Runtime::ConstrainedExecution::Cer::Success)]
723 
724  #else /* _M_CEE */
725   #define _BEGIN_LOCK(_Kind) 726     { 727         _STD _Lockit _Lock(_Kind);
728 
729   #define _END_LOCK() 730     }
731 
732   #define _BEGIN_LOCINFO(_VarName) 733     { 734         _Locinfo _VarName;
735 
736   #define _END_LOCINFO() 737     }
738 
739   #define _RELIABILITY_CONTRACT
740  #endif /* _M_CEE */
741 
742 class _CRTIMP2_PURE _Mutex
743     {    // lock under program control
744 public:
745 
746  #if _MULTI_THREAD
747   #if defined(_M_CEE_PURE) || defined(MRTDLL)
748     __CLR_OR_THIS_CALL _Mutex(_Uninitialized)
749         {    // do nothing
750         }
751 
752     __CLR_OR_THIS_CALL _Mutex()
753         {    // default construct
754         _Mutex_ctor(this);
755         }
756 
757     __CLR_OR_THIS_CALL ~_Mutex()
758         {    // destroy the object
759         _Mutex_dtor(this);
760         }
761 
762     void __CLR_OR_THIS_CALL _Lock()
763         {    // lock the mutex
764         _Mutex_Lock(this);
765         }
766 
767     void __CLR_OR_THIS_CALL _Unlock()
768         {    // unlock the mutex
769         _Mutex_Unlock(this);
770         }
771 
772   #else /* defined(_M_CEE_PURE) || defined(MRTDLL) */
773     __thiscall _Mutex(_Uninitialized)
774         {    // do nothing
775         }
776 
777     __thiscall _Mutex();
778     __thiscall ~_Mutex();
779     void __thiscall _Lock();
780     void __thiscall _Unlock();
781   #endif /* defined(_M_CEE_PURE) || defined(MRTDLL) */
782 
783 private:
784     static _MRTIMP2_NPURE_NCEEPURE void __CLRCALL_PURE_OR_CDECL _Mutex_ctor(_Mutex *);
785     static _MRTIMP2_NPURE_NCEEPURE void __CLRCALL_PURE_OR_CDECL _Mutex_dtor(_Mutex *);
786     static _MRTIMP2_NPURE_NCEEPURE void __CLRCALL_PURE_OR_CDECL _Mutex_Lock(_Mutex *);
787     static _MRTIMP2_NPURE_NCEEPURE void __CLRCALL_PURE_OR_CDECL _Mutex_Unlock(_Mutex *);
788 
789     __CLR_OR_THIS_CALL _Mutex(const _Mutex&);                // not defined
790     _Mutex& __CLR_OR_THIS_CALL operator=(const _Mutex&);    // not defined
791     void *_Mtx;
792 
793   #else /* _MULTI_THREAD */
794     void _Lock()
795         {    // do nothing
796         }
797 
798     void _Unlock()
799         {    // do nothing
800         }
801   #endif /* _MULTI_THREAD */
802     };
803 
804 class _CRTIMP2_PURE _Init_locks
805     {    // initialize mutexes
806 public:
807  #if _MULTI_THREAD
808       #if defined(_M_CEE_PURE) || defined(MRTDLL)
809     __CLR_OR_THIS_CALL _Init_locks()
810         {    // default construct
811         _Init_locks_ctor(this);
812         }
813 
814     __CLR_OR_THIS_CALL ~_Init_locks()
815         {    // destroy the object
816         _Init_locks_dtor(this);
817         }
818 
819   #else /* defined(_M_CEE_PURE) || defined(MRTDLL) */
820     __thiscall _Init_locks();
821     __thiscall ~_Init_locks();
822   #endif /* defined(_M_CEE_PURE) || defined(MRTDLL) */
823 
824 private:
825     static _MRTIMP2_NPURE void __cdecl _Init_locks_ctor(_Init_locks *);
826     static _MRTIMP2_NPURE void __cdecl _Init_locks_dtor(_Init_locks *);
827 
828  #else /* _MULTI_THREAD */
829     _Init_locks()
830         {    // do nothing
831         }
832 
833     ~_Init_locks()
834         {    // do nothing
835         }
836  #endif /* _MULTI_THREAD */
837     };
838 
839 #pragma warning(pop)
840 _STD_END
841  #endif /* __cplusplus */
842 
843 #ifndef _RELIABILITY_CONTRACT
844  #define _RELIABILITY_CONTRACT
845 #endif /* _RELIABILITY_CONTRACT */
846 
847         /* MISCELLANEOUS MACROS AND TYPES */
848 _C_STD_BEGIN
849 _MRTIMP2 void __cdecl _Atexit(void (__cdecl *)(void));
850 
851 typedef int _Mbstatet;
852 typedef unsigned long _Uint32t;
853 
854 #define _ATEXIT_T    void
855 #define _Mbstinit(x)    mbstate_t x = {0}
856 _C_STD_END
857 
858  #define _THROW_BAD_ALLOC    _THROW1(...)
859 
860  #pragma pack(pop)
861 
862 #endif /* _YVALS */
863 
864 
865 /*
866  * Copyright (c) 1992-2009 by P.J. Plauger.  ALL RIGHTS RESERVED.
867  * Consult your license regarding permissions and restrictions.
868  V5.20:0009 */

 

3、

4、

5、

6、

 

VS10异常.[_ITERATOR_DEBUG_LEVEL][_HAS_ITERATOR_DEBUGGING]

标签:ext   can   oid   char   inspect   mic   scl   忘记   __int64   

原文地址:https://www.cnblogs.com/qtzc/p/10281643.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!