forked from boostorg/config
Improve code to detect if wchar_t is a native type
[SVN r21919]
This commit is contained in:
@ -65,9 +65,15 @@
|
||||
#if BOOST_INTEL_CXX_VERSION < 700
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#else
|
||||
// _WCHAR_T_DEFINED is the Win32 spelling
|
||||
// _WCHAR_T is the Linux spelling
|
||||
# if !defined(_WCHAR_T_DEFINED) && !defined(_WCHAR_T)
|
||||
// We should test the macro _WCHAR_T_DEFINED to check if the compiler
|
||||
// supports wchar_t natively. *BUT* there is a problem here: the standard
|
||||
// headers define this macro if they typedef wchar_t. Anyway, we're lucky
|
||||
// because they define it without a value, while Intel C++ defines it
|
||||
// to 1. So we can check its value to see if the macro was defined natively
|
||||
// or not.
|
||||
// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T
|
||||
// is used instead.
|
||||
# if ((_WCHAR_T_DEFINED + 0) == 0)) && ((_WCHAR_T + 0) == 0)
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user