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
Here's a minimal example that I came up with
// clang++ -std=c++17 -Wbinding-in-condition -o main main.cpp
#include
struct X { template int get() { return 0; }
operator bool() { return true; } };
namespace std { template<> struct tuple_size { static constexpr std::size_t value = 1; }; template<> struct tuple_element<0, X> { using type = int; }; }
int main() { if (auto[a] = X()) return a; }
The above crashes with the attached log.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Extended Description
Here's a minimal example that I came up with
// clang++ -std=c++17 -Wbinding-in-condition -o main main.cpp
#include
struct X {
template
int get() { return 0; }
operator bool() { return true; }
};
namespace std {
template<>
struct tuple_size { static constexpr std::size_t value = 1; };
template<>
struct tuple_element<0, X> { using type = int; };
}
int main() {
if (auto[a] = X())
return a;
}
The above crashes with the attached log.
The text was updated successfully, but these errors were encountered: