Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang] Implement CWG2398 provisional TTP matching to class templates #94981

Merged

Commits on Aug 28, 2024

  1. [clang] Implement CWG2398 provisional TTP matching to class templates

    This extends default argument deduction to cover class templates as
    well.
    
    This solves some ambuguity introduced in P0522 regarding how
    template template parameters are partially ordered, and should reduce
    the negative impact of enabling `-frelaxed-template-template-args`
    by default.
    
    Given the following example:
    ```C++
    template <class T1, class T2 = float> struct A;
    template <class T3> struct B;
    
    template <template <class T4> class TT1, class T5> struct B<TT1<T5>>;   // #1
    template <class T6, class T7>                      struct B<A<T6, T7>>; // #2
    
    template struct B<A<int>>;
    ```
    Prior to P0522, `#2` was picked. Afterwards, this became ambiguous.
    This patch restores the pre-P0522 behavior, `#2` is picked again.
    mizvekov committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    2729c98 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Merge remote-tracking branch 'origin/main' into users/mizvekov/clang-…

    …cwg2398-ttp-matches-class-template
    mizvekov committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    530f884 View commit details
    Browse the repository at this point in the history
  2. Update clang/lib/AST/ASTContext.cpp

    Co-authored-by: cor3ntin <corentinjabot@gmail.com>
    mizvekov and cor3ntin authored Sep 5, 2024
    Configuration menu
    Copy the full SHA
    9c307db View commit details
    Browse the repository at this point in the history
  3. Update clang/lib/Sema/SemaTemplateDeduction.cpp

    Co-authored-by: cor3ntin <corentinjabot@gmail.com>
    mizvekov and cor3ntin authored Sep 5, 2024
    Configuration menu
    Copy the full SHA
    c414b9c View commit details
    Browse the repository at this point in the history
  4. Update clang/lib/Sema/SemaTemplateDeduction.cpp

    Co-authored-by: cor3ntin <corentinjabot@gmail.com>
    mizvekov and cor3ntin authored Sep 5, 2024
    Configuration menu
    Copy the full SHA
    653f6fa View commit details
    Browse the repository at this point in the history
  5. fixup

    mizvekov committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    09440f8 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. fixup

    mizvekov committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    b9900e4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ae27685 View commit details
    Browse the repository at this point in the history
  3. cleanup

    mizvekov committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    2ace043 View commit details
    Browse the repository at this point in the history
  4. Merge remote-tracking branch 'origin/main' into users/mizvekov/clang-…

    …cwg2398-ttp-matches-class-template
    mizvekov committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    5275f0d View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2024

  1. Update clang/include/clang/AST/ASTContext.h

    Co-authored-by: cor3ntin <corentinjabot@gmail.com>
    mizvekov and cor3ntin authored Sep 7, 2024
    Configuration menu
    Copy the full SHA
    446f916 View commit details
    Browse the repository at this point in the history
  2. comment

    mizvekov committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    861d1bc View commit details
    Browse the repository at this point in the history