summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/koenig13.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/koenig13.C')
-rw-r--r--gcc/testsuite/g++.dg/lookup/koenig13.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/koenig13.C b/gcc/testsuite/g++.dg/lookup/koenig13.C
new file mode 100644
index 000000000..625a181f6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/koenig13.C
@@ -0,0 +1,16 @@
+// PR c++/42687
+// DR 705
+
+namespace N
+{
+ struct S { };
+ void f(const S &) { }
+}
+
+void f(const N::S &) { }
+
+int main()
+{
+ N::S v;
+ (f)(v); // no ambiguity: ADL is prevented with (), only ::f is considered
+}