repo.or.cz
/
official-gcc
/
graphite-test-results.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
sfinae15.C
blob
27bce255db37c71bfccae89b7ec346f1e56d97c1
1
// PR c++/40944
2
// { dg-options -std=c++0x }
3
// { dg-do run }
4
5
template<typename T>
6
struct make { static T&& it(); };
7
8
void (*pf)(int&) = 0;
9
10
template< typename T >
11
int bar(T const& x,
12
decltype( pf(make<T const&>::it()) )* = 0 // SFINAE!
13
) {
14
return 1;
15
}
16
17
int bar(...) {
18
return 0;
19
}
20
21
int main() {
22
return bar(42);
23
}