Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preprocessor defines for True and False in libqhull_r.h #95

Open
kzampog opened this issue Aug 27, 2021 · 3 comments
Open

Preprocessor defines for True and False in libqhull_r.h #95

kzampog opened this issue Aug 27, 2021 · 3 comments

Comments

@kzampog
Copy link

kzampog commented Aug 27, 2021

Hello,

The preprocessor defines in:

#define False 0

can cause problems with other libraries, as True and False are pretty common tokens (e.g., see https://github.com/stevenlovegrove/Pangolin/blob/master/components/pango_core/include/pangolin/utils/true_false_toggle.h).

If these are truly needed, would it be possible to have them renamed to something less likely to cause unwanted interactions?

Thanks!

@cbbarber
Copy link
Collaborator

Good suggestion. libqhull_r.h defines qh_True for users who want to avoid using 'True' in their code.

Since a rename affects almost all files and would break existing code, this change will be considered for the next release (hopefully some time next year).

@kzampog
Copy link
Author

kzampog commented Sep 23, 2021

This makes sense -- thank you!!

@StefanBruens
Copy link

C99 also has <stdbool.h> which defines true and false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants