repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
sfinae13.C
blob
3cff1b4b9b1bc289d11510a2751d1f0faf08dda4
1
// PR c++/48581
2
// { dg-do compile { target c++11 } }
3
4
template<class T>
5
T&& create();
6
7
template<class T,
8
class = decltype(foo(create<T>()))
9
>
10
auto f(int) -> char;
11
12
template<class>
13
auto f(...) -> char (&)[2];
14
15
struct S {};
16
void foo(S);
17
18
static_assert(sizeof(f<S>(0)) == 1, "Error"); // (#)
19
20
int main() {}