repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix PR c++/69139 (deduction failure with trailing return type)
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
fntmpdefarg2.C
blob
663f4004846aa7c11a567fc4d514b48defff6c9f
1
// PR c++/46831
2
// { dg-do compile { target c++11 } }
3
// { dg-options "" }
4
5
struct B { };
6
struct D : B { };
7
struct A {
8
template<typename T = void> operator D&(); // { dg-message "template conversion" }
9
operator long();
10
};
11
12
void f(long);
13
void f(B&);
14
15
struct A2 {
16
template<typename T = void> operator B&();
17
};
18
19
void f2(const B&);
20
21
int main() {
22
f(A());
23
f2(A2());
24
f2(A()); // { dg-error "" }
25
}