Commit 1fe62960 by Paolo Carlini Committed by Paolo Carlini

re PR c++/57874 (No SFINAE on ADL lookup failure)

2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57874
	* g++.dg/cpp0x/sfinae48.C: New.

From-SVN: r200880
parent d5e48350
2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57874
* g++.dg/cpp0x/sfinae48.C: New.
2013-07-10 Jakub Jelinek <jakub@redhat.com> 2013-07-10 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/57824 PR preprocessor/57824
......
// 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, "");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment