Paul Eggert wrote:
> > +# if !defined _MSC_VER
> > +#  define false false
> > +#  define true true
> > +# endif
> 
> How about using "#ifndef true" instead?

This will not work, as 'true' and 'false' are keywords, not macros, in C++ mode,
with this compiler.

> That will be more portable in 
> the presence of other platforms with this portability issue.

The portability issue is that one of the MSVC headers does basically
  #ifdef __cplusplus
  # if defined false || defined true || defined bool || ...
  #  error "..."
  # endif
  #endif

For the combination of clang with MSVC header files, clang defines _MSC_VER,
therefore the workaround should also be effective in this case.

Bruno




Reply via email to