1 #ifndef __TCSTLINCLUDES_H__
2 #define __TCSTLINCLUDES_H__
3 
4 #ifdef WIN32
5 // In Windows, we have to disable a number of warnings in order to use any STL
6 // classes without getting tons of warnings.  The following warning is shut off
7 // completely; it's just the warning that identifiers longer than 255 characters
8 // will be truncated in the debug info.  I really don't care about this.  Note
9 // that the other warnings are only disabled during the #include of the STL
10 // headers due to the warning(push) and warning(pop).
11 #pragma warning(push, 1)	// Minimum warnings during STL includes
12 // Disable more warnings.  Note that they're reenable at the pop below.
13 // 4702: Unreachable code.
14 // 4786: Identifier truncated to 255 characters in debug info.
15 #pragma warning(disable: 4702 4786)	// Unreachable code warnings pop up also.
16 #ifndef _DEBUG
17 #pragma warning(disable: 4710) // "Not inlined" warnings in release mode.
18 #endif // _DEBUG
19 #endif // WIN32
20 #include <string>
21 #include <map>
22 #include <vector>
23 #include <list>
24 #include <algorithm>
25 #include <stack>
26 #include <set>
27 #include <string.h>
28 
29 #ifdef WIN32
30 
31 #if _MSC_VER < 1400	// VC < VC 2005
32 #define strcasecmp stricmp
33 #define strncasecmp strnicmp
34 #define wcscasecmp wcsicmp
35 #define wcsncasecmp wcsnicmp
36 #else //  VC < VC 2005
37 #define strcasecmp _stricmp
38 #define strncasecmp _strnicmp
39 #define wcscasecmp _wcsicmp
40 #define wcsncasecmp _wcsnicmp
41 #endif // VC < VC 2005
42 
43 #ifndef USE_CPP11
44 
45 #if defined(_MSC_VER) && _MSC_VER <= 1200
46 
47 #ifdef _NO_BOOST
48 
49 // MS VC++ 6.0 doesn't have the min/max STL functions.  The following from
50 // Boost gets them defined.
51 #define TC_PREVENT_MACRO_SUBSTITUTION
52 
53 namespace std {
54   template <class _Typ>
TC_PREVENT_MACRO_SUBSTITUTION(const _Typ & __a,const _Typ & __b)55   inline const _Typ& min TC_PREVENT_MACRO_SUBSTITUTION (const _Typ& __a, const _Typ& __b) {
56     return __b < __a ? __b : __a;
57   }
58   template <class _Typ>
TC_PREVENT_MACRO_SUBSTITUTION(const _Typ & __a,const _Typ & __b)59   inline const _Typ& max TC_PREVENT_MACRO_SUBSTITUTION (const _Typ& __a, const _Typ& __b) {
60     return  __a < __b ? __b : __a;
61   }
62 }
63 
64 #else // _NO_BOOST
65 
66 // MS VC++ 6.0 doesn't have the min/max STL functions.  The following include from
67 // Boost gets them defined.
68 #include <boost/config.hpp>
69 
70 #endif // !_NO_BOOST
71 
72 #endif
73 
74 #pragma warning(pop)
75 #endif // WIN32
76 
77 #endif
78 
79 #ifdef NO_WSTRING
80 // NOTE: on system without wstring, the std namespace isn't used.
81 typedef basic_string<wchar_t> wstring;
82 #endif
83 
84 struct less_no_case
85 {
operatorless_no_case86 	bool operator()(const std::string& _Left, const std::string& _Right) const
87 	{
88 		return strcasecmp(_Left.c_str(), _Right.c_str()) < 0;
89 	}
90 };
91 
92 #endif //__TCSTLINCLUDES_H__
93