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

Question about ctgmath and tgmath.h #27

Closed
thomthom opened this issue Feb 21, 2018 · 3 comments
Closed

Question about ctgmath and tgmath.h #27

thomthom opened this issue Feb 21, 2018 · 3 comments

Comments

@thomthom
Copy link
Contributor

#ifdef WIN32
#include <ctgmath>
#else
#include <tgmath.h>
#endif // WIN32

Why this ifdef?

I usually only use <cmath>. Looking at <ctgmath> it appear to include <cmath> and `.

Why the need for different includes? Isn't <cmath> enough for this file?

@TommyKaneko
Copy link
Owner

Would love a Windows developer to assess this....

@thomthom
Copy link
Contributor Author

When I look up <tgmath.h> I find references to The Open Group Library. Doesn't seem to be part of the standard libs.

I'd recommend sticking with std libs for as much as possible. I think <cmath is enough for the whole file - and that should be platform compatible since it's std library. (Personally I prefer to use the std:: prefixed versions like std::abs over the global non-namespaced abs, fabs C style variants.

@TommyKaneko
Copy link
Owner

fixed in 2b7e168

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

2 participants