[clang] [libcxx] Reland: [clang] unified CWG2398 and P0522 changes; finishes implementation of P3310 (PR #124137)
Ziqing Luo via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 17:04:04 PDT 2025
ziqingluo-90 wrote:
> Hi @mizvekov
>
> I believe this change is impacting our downstream compiler. Here is a minimal example:
>
> ```
> #include <utility>
> #include <cstddef>
> namespace {
>
> template <typename INDEX_SEQUENCE>
> class ForEach; // intentionally undefined
>
> template <size_t... INDICES, template <typename, size_t...> class INDEX_CONTAINER>
> class ForEach<INDEX_CONTAINER<size_t, INDICES...>> {};
>
> } //namespace
>
> static void go()
> {
> ForEach<std::make_index_sequence<42>> X;
> }
> ```
>
> It was accepted by clang 19.1.0 and gcc but not the clang trunk: https://godbolt.org/z/hdYWq86Ke
>
> I'm not an expert, could you explain to me why `ForEach<std::make_index_sequence<42>>` does not specialize this template ` class ForEach<INDEX_CONTAINER<size_t, INDICES...>> {};`?
@mizvekov, can you take a look at this?
https://github.com/llvm/llvm-project/pull/124137
More information about the cfe-commits
mailing list