mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 03:56:06 +00:00
Add another test for weird substitutions into function types during template argument deduction
llvm-svn: 99510
This commit is contained in:
parent
da61afaf9d
commit
66767ea93c
@ -42,3 +42,16 @@ void instF0(X0<T(A1)> x0a, X0<T(A2)> x0b) {
|
||||
}
|
||||
|
||||
template void instF0<int, int, float>(X0<int(int)>, X0<int(float)>);
|
||||
|
||||
template<typename R, typename A1, R (*ptr)(A1)> struct FuncPtr { };
|
||||
template<typename A1, int (*ptr)(A1)> struct FuncPtr<int, A1, ptr> { };
|
||||
|
||||
template<typename R, typename A1> R unary_func(A1);
|
||||
|
||||
template<typename R, typename A1, typename A2>
|
||||
void use_func_ptr() {
|
||||
FuncPtr<R, A1, &unary_func<R, A1> > fp1;
|
||||
FuncPtr<R, A2, &unary_func<R, A2> > fp2;
|
||||
};
|
||||
|
||||
template void use_func_ptr<int, float, double>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user