ennorehling · GitHub

In utf8proc.h, true, false and bool are defined. They are reserved keywords in modern C (not just C++), and clash with those definitions.

#  ifndef __cplusplus
typedef unsigned char utf8proc_bool;
enum {false, true};
#  else
typedef bool utf8proc_bool;
#  endif

This breaks compilation on MSVC, and there is no preprocessor macro I can define to let utf8proc.h know that bool is already defined elsewhere. Aside from the C99 standard, it also breaks if the utf8proc.h header is included after one that also defines false and true (like stdbool.h, which can be tested for with the __bool_true_false_are_defined feature macro).

Read the original on github.com ↗