PR c++/57874
* g++.dg/cpp0x/sfinae48.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200880
138bc75d-0d04-0410-961f-
82ee72b054a4
+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>
PR preprocessor/57824
--- /dev/null
+// 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, "");