-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Open
Labels
c++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"rejects-valid
Description
template<template<class T> class> struct A {};
template<class T> struct Q {};
template<class T> using R = Q<T>;
int f(A<R>);
int g(A<Q> a) { return f(a); }
GCC accepts (since 4.9.0), Clang rejects with:
<source>:5:24: error: no matching function for call to 'f'
int g(A<Q> a) { return f(a); }
^
<source>:4:5: note: candidate function not viable: no known conversion from 'A<template Q>' to 'A<template R>' for 1st argument
int f(A<R>);
^
-frelaxed-template-template-args
doesn't seem to help in any recent major.
jakub-homola
Metadata
Metadata
Assignees
Labels
c++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"rejects-valid