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
* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
sfinae48.C
blob
ba728d9de8f3277a619aedc771078d959f5c2e7e
1
// PR c++/57874
2
// { dg-do compile { target c++11 } }
3
4
namespace NX
5
{
6
struct X {};
7
void foo(X) {}
8
}
9
10
namespace NY
11
{
12
struct Y {};
13
}
14
15
template<class T>
16
auto ADLfoo(T&&) -> decltype((foo(T{}), short()));
17
18
char ADLfoo(...);
19
20
static_assert(sizeof(ADLfoo(NY::Y{})) == 1, "");
21
static_assert(sizeof(ADLfoo(NX::X{})) == 2, "");