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

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Mon May 13 09:31:42 PDT 2024


  Branch: refs/heads/users/mizvekov/GH62529-tweak-CWG1430-TTP-partial-order
  Home:   https://github.com/llvm/llvm-project
  Commit: f882dca5a53a6da8ad92492f28f9eacffb34a780
      https://github.com/llvm/llvm-project/commit/f882dca5a53a6da8ad92492f28f9eacffb34a780
  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

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