mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-08 03:40:21 -04:00
added a check for wchar_t to deal with a potential problem with MS compilers
This commit is contained in:
parent
801d893678
commit
ab82cc7f87
@ -30,6 +30,15 @@
|
||||
#include <config.h> // To check for long long
|
||||
#endif
|
||||
|
||||
// If Microsoft has already typedef'd wchar_t as an unsigned
|
||||
// short, then compiles will break because it's as if we're
|
||||
// creating ArgTraits twice for unsigned short. Thus...
|
||||
#ifdef _MSC_VER
|
||||
#ifndef _NATIVE_WCHAR_T_DEFINED
|
||||
#define TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace TCLAP {
|
||||
|
||||
// ======================================================================
|
||||
@ -156,13 +165,16 @@ struct ArgTraits<bool> {
|
||||
typedef ValueLike ValueCategory;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* wchar_ts have value-like semantics.
|
||||
*/
|
||||
#ifndef TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS
|
||||
template<>
|
||||
struct ArgTraits<wchar_t> {
|
||||
typedef ValueLike ValueCategory;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Strings have string like argument traits.
|
||||
|
Loading…
x
Reference in New Issue
Block a user