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++/81917 - ICE with void_t and partial specialization.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
sfinae28.C
blob
1bd9c2cd3f1da1e06f14d2b504fd3c5d57e67a1d
1
// Origin: PR c++/44267
2
3
struct B {};
4
struct D : B {};
5
struct VD : virtual B {};
6
7
template <class T> T create();
8
9
typedef char one[1];
10
typedef char two[2];
11
12
template <class D, class B>
13
one& f(char (*)[sizeof(static_cast<D>(create<B>()))]);
14
15
template <class D, class B>
16
two& f(...);
17
18
int main()
19
{
20
f<D*, int>(0);
21
f<D*, B*>(0);
22
f<VD*, B*>(0);
23
return 0;
24
}