STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
use_ansi.h
Go to the documentation of this file.
1 /***
2 *use_ansi.h - pragmas for ANSI Standard C++ libraries
3 *
4 * Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 *Purpose:
7 * This header is intended to force the use of the appropriate ANSI
8 * Standard C++ libraries whenever it is included.
9 *
10 * [Public]
11 *
12 ****/
13 
14 #pragma once
15 
16 #ifndef _USE_ANSI_CPP
17 #define _USE_ANSI_CPP
18 
19 #ifdef _CRTBLD
20 #define _CRT_NOPRAGMA_LIBS
21 #else
22 #undef _CRT_NOPRAGMA_LIBS
23 #endif
24 
25 #ifndef _CRT_NOPRAGMA_LIBS
26 
27 #if !defined(_M_CEE_PURE) && !defined(MRTDLL)
28 
29 #undef _DEBUG_AFFIX
30 #undef _IDL_AFFIX
31 #undef _IDL_DEFAULT
32 #undef _LIB_STEM
33 
34 #ifdef _DEBUG
35  #define _DEBUG_AFFIX "d"
36  #define _IDL_DEFAULT 2
37 #else
38  #define _DEBUG_AFFIX ""
39  #define _IDL_DEFAULT 0
40 #endif
41 
42 #if defined(_DLL) && !defined(_STATIC_CPPLIB)
43  #define _LIB_STEM "msvcprt"
44 #else
45  #define _LIB_STEM "libcpmt"
46 
47  #if _ITERATOR_DEBUG_LEVEL != _IDL_DEFAULT
48  #define _IDL_AFFIX _STRINGIZE(_ITERATOR_DEBUG_LEVEL)
49  #endif
50 #endif
51 
52 #ifdef _IDL_AFFIX
53 #else
54  #define _IDL_AFFIX ""
55 #endif
56 
57 #pragma comment(lib, _LIB_STEM _DEBUG_AFFIX _IDL_AFFIX)
58 
59 #undef _DEBUG_AFFIX
60 #undef _IDL_AFFIX
61 #undef _IDL_DEFAULT
62 #undef _LIB_STEM
63 
64 #endif /* !defined(_M_CEE_PURE) && !defined(MRTDLL) */
65 
66 #endif /* _CRT_NOPRAGMA_LIBS */
67 
68 #endif /* _USE_ANSI_CPP */