[all-commits] [llvm/llvm-project] a96057: [clang] CTAD: implement the missing IsDeducible co...

Haojian Wu via All-commits all-commits at lists.llvm.org
Thu May 16 04:01:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9605730a481707623358d3b12220f05cfdc50a8
      https://github.com/llvm/llvm-project/commit/a9605730a481707623358d3b12220f05cfdc50a8
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
    M clang/include/clang/Basic/TokenKinds.def
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Basic/TypeTraits.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/test/AST/ast-dump-ctad-alias.cpp
    M clang/test/SemaCXX/cxx20-ctad-type-alias.cpp
    M clang/test/SemaTemplate/deduction-guide.cpp
    M clang/www/cxx_status.html

  Log Message:
  -----------
  [clang] CTAD: implement the missing IsDeducible constraint for alias templates  (#89358)

Fixes https://github.com/llvm/llvm-project/issues/85192
Fixes https://github.com/llvm/llvm-project/issues/84492

This patch implements the "IsDeducible" constraint where the template
arguments of the alias template can be deduced from the returned type of
the synthesized deduction guide, per C++ [over.match.class.deduct]p4. In
the implementation, we perform the deduction directly, which is more
efficient than the way specified in the standard.

Also update relevant CTAD tests which were incorrectly compiled due to
the missing constraint.



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