X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df44dcedaab506c016a07ffdfda2b6a89a529186..632c86a3e6a8e5e7e16617a53b1419d394cedb30:/include/wx/private/flagscheck.h diff --git a/include/wx/private/flagscheck.h b/include/wx/private/flagscheck.h index 751278eedf..3e3d9fbaae 100644 --- a/include/wx/private/flagscheck.h +++ b/include/wx/private/flagscheck.h @@ -3,7 +3,6 @@ // Purpose: helpers for checking that (bit)flags don't overlap // Author: Vaclav Slavik // Created: 2008-02-21 -// RCS-ID: $Id$ // Copyright: (c) 2008 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,6 +11,10 @@ #define _WX_PRIVATE_FLAGSCHECK_H_ #include "wx/debug.h" + +// IBM xlC 8 can't parse the template syntax +#if !defined(__IBMCPP__) + #include "wx/meta/if.h" namespace wxPrivate @@ -36,7 +39,7 @@ namespace wxPrivate // // 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 -// the macros below with empty stubs, this isn't anything criticial. +// the macros below with empty stubs, this isn't anything critical. template struct FlagsHaveConflictingValues { @@ -101,6 +104,10 @@ template struct SafelyAddToMask #define wxADD_FLAG(f, others) \ ::wxPrivate::SafelyAddToMask::value +#else + #define wxADD_FLAG(f, others) (f | others) +#endif + // Checks if flags value 'f' is within the mask of allowed values #define wxASSERT_VALID_FLAGS(f, mask) \ wxASSERT_MSG( (f & mask) == f, \