[all-commits] [llvm/llvm-project] b8f802: [clang] Allow pack expansions when partial orderin...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Mon May 13 10:28:27 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8f802f783db481ecfd953c9abe74212a8348aff
      https://github.com/llvm/llvm-project/commit/b8f802f783db481ecfd953c9abe74212a8348aff
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2024-05-13 (Mon, 13 May 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    R clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp
    A clang/test/SemaTemplate/temp_arg_template_p0522.cpp

  Log Message:
  -----------
  [clang] Allow pack expansions when partial ordering against template template parameters (#91833)

When partial ordering alias templates against template template
parameters, allow pack expansions when the alias has a fixed-size
parameter list.

These expansions were generally disallowed by proposed resolution for
CWG1430.

By previously diagnosing these when checking template template
parameters, we would be too strict in trying to prevent any potential
invalid use.

This flows against the more general idea that template template
parameters are weakly typed, that we would rather allow an argument that
might be possibly misused, and only diagnose the actual misuses during
instantiation.

Since this interaction between P0522R0 and CWG1430 is also a
backwards-compat breaking change, we implement provisional wording to
allow these.

Fixes https://github.com/llvm/llvm-project/issues/62529



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list