fix for IBM xlC 8, it can't parse the template syntax

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2009-02-19 05:34:25 +00:00
parent 8d3166e8ac
commit be4674271d

View File

@@ -12,6 +12,10 @@
#define _WX_PRIVATE_FLAGSCHECK_H_ #define _WX_PRIVATE_FLAGSCHECK_H_
#include "wx/debug.h" #include "wx/debug.h"
// IBM xlC 8 can't parse the template syntax
#if !defined(__IBMCPP__)
#include "wx/meta/if.h" #include "wx/meta/if.h"
namespace wxPrivate namespace wxPrivate
@@ -36,7 +40,7 @@ namespace wxPrivate
// //
// NB: If any of this doesn't compile with your compiler and would be too // NB: If any of this doesn't compile with your compiler and would be too
// hard to make work, it's probably best to disable this code and replace // hard to make work, it's probably best to disable this code and replace
// the macros below with empty stubs, this isn't anything criticial. // the macros below with empty stubs, this isn't anything critical.
template<int val> struct FlagsHaveConflictingValues template<int val> struct FlagsHaveConflictingValues
{ {
@@ -101,6 +105,10 @@ template<int all, int add> struct SafelyAddToMask
#define wxADD_FLAG(f, others) \ #define wxADD_FLAG(f, others) \
::wxPrivate::SafelyAddToMask<f, others>::value ::wxPrivate::SafelyAddToMask<f, others>::value
#else
#define wxADD_FLAG(f, others) (f | others)
#endif
// Checks if flags value 'f' is within the mask of allowed values // Checks if flags value 'f' is within the mask of allowed values
#define wxASSERT_VALID_FLAGS(f, mask) \ #define wxASSERT_VALID_FLAGS(f, mask) \
wxASSERT_MSG( (f & mask) == f, \ wxASSERT_MSG( (f & mask) == f, \