Skip to content

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