RcppParallel.h introduces conflicting macro variables on Mac
traversc opened this issue · 1 comments
traversc commented
On Mac, RcppParallel.h introduces TRUE and FALSE macro variables brought in from system headers (mach/boolean.h) that conflict with TRUE and FALSE definitions from R headers.
If RcppParallel.h is added to <package_name>_types.h, it then breaks RcppExports.cpp.
A simple fix could be to undef TRUE and FALSE in RcppParallel.h. Reproducible example: https://github.com/traversc/mactest/blob/main/src/mactest_types.h#L9
Alternatively, TRUE and FALSE macros could be re-assigned to something else like R_TRUE and R_FALSE in RcppExports.cpp
kevinushey commented
Thanks for the bug report -- would you be willing to provide a PR?