We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've found very simple case where clang gives wrong diagnosis.
Let's consider smallest possible program:
#include <type_traits> int main() { if constexpr (std::is_same_v<int, int>) {} else if constexpr (std::is_same_v<double, int>) {} }
clang outputs:
error: constexpr if condition is not a constant expression else if constexpr (std::is_same_v<double, int>) {}
Cause of this is statement: if constexpr (std::is_same_v<int, int>) any further if constexpr statement is not considered as constant expression.
if constexpr (std::is_same_v<int, int>)
if constexpr
The text was updated successfully, but these errors were encountered:
I put a patch up here: https://reviews.llvm.org/D48322
Sorry, something went wrong.
The patch landed as r336233. Thanks for reporting this!
No branches or pull requests
Extended Description
I've found very simple case where clang gives wrong diagnosis.
Let's consider smallest possible program:
clang outputs:
Cause of this is statement:
if constexpr (std::is_same_v<int, int>)
any further
if constexpr
statement is not considered as constant expression.The text was updated successfully, but these errors were encountered: