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
The code (Godbolt)
#include <__type_traits/integral_constant.h> template <class T> struct rank : std::integral_constant<int, __array_rank(T)> {}; template <class T> void test_rank() { static_assert(rank<T>::value == 0); } void func() { test_rank<void>(); }
generates func(), but doesn't generate test_rank<void>().
func()
test_rank<void>()
The text was updated successfully, but these errors were encountered:
@llvm/issue-subscribers-clang-codegen
Sorry, something went wrong.
Potentially related: return statement in f is ignored.
f
template<auto v> struct integral_constant { static inline constexpr auto value = v; }; template<class T> struct rank : integral_constant<__array_rank(T)> {}; __SIZE_TYPE__ f() { return rank<int[1]>::value; }
@llvm/issue-subscribers-clang-frontend
Looks like this got fixed in 19: https://godbolt.org/z/WWqdnnYPs
No branches or pull requests
The code (Godbolt)
generates
func()
, but doesn't generatetest_rank<void>()
.The text was updated successfully, but these errors were encountered: