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
PR c++/85765 - SFINAE and non-type default template arg.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
overload-conv-1.C
blob
5817ad5606b94cba62f6f380f59e55ffd0b364fa
1
// { dg-do link { target c++11 } }
2
3
struct S {};
4
5
struct T
6
{
7
operator S() { return S(); }
8
};
9
10
struct U
11
{
12
operator S&() { return *static_cast<S*>(0); }
13
};
14
15
void f(const S&);
16
void f(S&&) {}
17
18
void g(const S&) {}
19
void g(S&&);
20
21
int main()
22
{
23
T t;
24
f(t);
25
26
U u;
27
g(u);
28
}