Skip to content

Clang fails to match the out-of-line member function specialization's noexcept specifier containing packs #105462

Open
@zyn0217

Description

@zyn0217

I stumbled upon this case when I was trying to clean up the uses of getTemplateInstantiationArgs(), which is in preparation for my CWG 2369 implementation.

https://clang.godbolt.org/z/MnYbGKoqP

template <typename T> struct S {
  template <typename... U>
  constexpr int UseAlignOf(int param = 1) noexcept(sizeof...(U) == 4);
};

template <>
template <typename... U>
constexpr int S<int>::UseAlignOf(int param) noexcept(sizeof...(U) == 4) {
  return param;
}

static_assert(S<int>().UseAlignOf<char>(), "");

Tested with @jcsxky's #102267 but everything persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issuediverges-from:msvcDoes the clang frontend diverge from msvc on this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions