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

'if constexpr' warning (c++17) #887

Merged
merged 14 commits into from Apr 1, 2019
Merged

'if constexpr' warning (c++17) #887

merged 14 commits into from Apr 1, 2019

Conversation

ghost
Copy link

@ghost ghost commented Mar 31, 2019

Adds 'if constexpr' to conditional constant expressions.
Removes warning: conditional expression is constant, consider using 'if constexpr' statement instead

Removes warning: conditional expression is constant, consider using 'if constexpr' statement instead
Enable 'if constexpr' when c++17
@ghost
Copy link
Author

ghost commented Mar 31, 2019

Updated enable 'if constexpr' when c++17 is enabled.

@Groovounet Groovounet self-assigned this Apr 1, 2019
@Groovounet Groovounet added this to the GLM 0.9.9 milestone Apr 1, 2019
@Groovounet Groovounet merged commit 1498e09 into g-truc:master Apr 1, 2019
@Groovounet
Copy link
Member

Thanks for contributing!

@taketwo
Copy link

taketwo commented Jul 3, 2019

This condition enables if constexpr for GCC7 and above, irrespective of the C++ standard actually used:

# elif (GLM_COMPILER & GLM_COMPILER_GCC) 
#	define GLM_HAS_IF_CONSTEXPR GLM_COMPILER >= GLM_COMPILER_GCC7

As a result, compilation with GCC7 in C++11 mode fails. What's the reason to have this condition? It does not make sense to me.

@ghost
Copy link
Author

ghost commented Jul 8, 2019 via email

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

Successfully merging this pull request may close these issues.

3 participants