Open
Description
template<typename T, int I = 0>
struct A {};
template<typename T, int I = 0>
using B = A<T, I>;
template<template <typename> typename T>
void g() {}
void f() {
g<A>();
g<B>();
}
fails to compile on Clang 16 (using -frelaxed-template-template-args
) with the following error:
<source>:12:5: error: no matching function for call to 'g'
g<B>();
^~~~
<source>:8:6: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'T'
void g() {}
^
The same code compiles on Clang 15. Removing -frelaxed-template-template-args
makes that code fail in both Clang 15 and 16 and also complains about g<A>()
with the same error.