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
/
explicit5.C
blob
1adb8d67ecdb3b2313a7aee526d5d06d2dbad0d1
1
// test for extension of DR 899 to handle template ctors
2
// { dg-do run { target c++11 } }
3
4
int r = 1;
5
6
struct C {
7
C() { }
8
template <class T = int> C(C&, T = 0) { r = 0; }
9
};
10
11
C c;
12
13
struct A
14
{
15
explicit operator C&() const { return c; }
16
};
17
18
int main()
19
{
20
A a;
21
C c2 (a);
22
23
return r;
24
}