-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Clang rejects call to base class member function inside requires inside constexpr if using scope resolution operator #83979
Comments
@llvm/issue-subscribers-clang-frontend Author: Anoop Rana (ranaanoop)
The following program is rejected by clang :[Demo](https://godbolt.org/z/34ra7aM1s)
```
#include<type_traits>
template<typename T> struct B template <typename T,typename S> int main()
<source>:19:22: error: static assertion failed due to requirement 'AlwaysFalse<A<B, double>>::value': foo is not implemented.
|
@llvm/issue-subscribers-c-20 Author: Anoop Rana (ranaanoop)
The following program is rejected by clang :[Demo](https://godbolt.org/z/34ra7aM1s)
```
#include<type_traits>
template<typename T> struct B template <typename T,typename S> int main()
<source>:19:22: error: static assertion failed due to requirement 'AlwaysFalse<A<B, double>>::value': foo is not implemented.
|
Duplicate: #84020 When a bug comes from a Stackoverflow we should link to the SO post for reference, this should also help to catch duplicates when screening bugs, thank you! |
The following program is rejected by clang :Demo
Clang says:
Note program work if we change constexpr if to
if constexpr (requires(T t){t. template foo<S>();})
. DemoThe text was updated successfully, but these errors were encountered: