-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Rejects-valid with variadic alias template in variadic class template #17042
Comments
I came up with an essentially identical approach. The test added for #17020 seems to fail with such a patch, due to an assertion failure in template argument deduction. Extended test case triggering the same assertion failure: --- test/SemaCXX/alias-template.cpp (revision 186726)
|
@llvm/issue-subscribers-clang-frontend |
Nothing has changed as of Clang 16: https://godbolt.org/z/86YzhKjb6 |
Since #61415 seems to be caused by this issue, I'll note that this is affecting c++23 builds with libstdc++-13. Example docker run -it --rm ubuntu:mantic bash -c "
export DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC
apt update
apt install -y gcc-13 clang-17
echo '
#include <map>
#include <tuple>
void f() {
std::map<std::tuple<int, int>, int>{}[std::make_tuple(0, 0)];
}
' > test.cpp
clang++-17 -std=c++23 test.cpp" |
My previous example seems to be fixed in trunk: https://godbolt.org/z/eMfYsEbo1 |
Extended Description
Testcase:
template<int ...Args1> struct A {
template<int ...Args2> using B = A<(Args1+Args2)...>;
};
template<int ...Args> using X = A<1,2,3>::B<Args...>;
Currently prints:
:2:53: error: pack expansion contains parameter pack 'Args2' that has a different length (3 vs. 1) from outer parameter packs
template<int ...Args2> using B = A<(Args1+Args2)...>;
~~~~~ ^
:4:43: note: in instantiation of template type alias 'B' requested here
template<int ...Args> using X = A<1,2,3>::B<Args...>;
^
1 error generated.
I don't see any obvious reason why this wouldn't be allowed by the standard.
The text was updated successfully, but these errors were encountered: