aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
diff options
context:
space:
mode:
authorMatheus Izvekov <mizvekov@gmail.com>2024-05-22 15:59:55 -0300
committerGitHub <noreply@github.com>2024-05-22 15:59:55 -0300
commitff3f41deb04c03ba57658776e4e0dc26ef01187d (patch)
treed91657f59be1b0fa4d8a1334b7fd68708377ec22 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
parentf3dc732b3623c86164f9d95f7563f982cecc5558 (diff)
downloadllvm-ff3f41deb04c03ba57658776e4e0dc26ef01187d.zip
llvm-ff3f41deb04c03ba57658776e4e0dc26ef01187d.tar.gz
llvm-ff3f41deb04c03ba57658776e4e0dc26ef01187d.tar.bz2
[clang] Implement CWG2398 provisional TTP matching to class templates (#92855)
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. When performing template argument deduction, we extend the provisional wording introduced in https://github.com/llvm/llvm-project/pull/89807 so it also covers deduction of class templates. 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. This has the beneficial side effect of making the following code valid: ```C++ template<class T, class U> struct A {}; A<int, float> v; template<template<class> class TT> void f(TT<int>); // OK: TT picks 'float' as the default argument for the second parameter. void g() { f(v); } ``` --- Since this changes provisional implementation of CWG2398 which has not been released yet, and already contains a changelog entry, we don't provide a changelog entry here.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h')
0 files changed, 0 insertions, 0 deletions