blob: ba728d9de8f3277a619aedc771078d959f5c2e7e [file] [log] [blame]
// PR c++/57874
// { dg-do compile { target c++11 } }
namespace NX
{
struct X {};
void foo(X) {}
}
namespace NY
{
struct Y {};
}
template<class T>
auto ADLfoo(T&&) -> decltype((foo(T{}), short()));
char ADLfoo(...);
static_assert(sizeof(ADLfoo(NY::Y{})) == 1, "");
static_assert(sizeof(ADLfoo(NX::X{})) == 2, "");