aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/drs/dr16xx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/drs/dr16xx.cpp')
-rw-r--r--test/CXX/drs/dr16xx.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/CXX/drs/dr16xx.cpp b/test/CXX/drs/dr16xx.cpp
index 4f2f06e0d0..b5047e8fe2 100644
--- a/test/CXX/drs/dr16xx.cpp
+++ b/test/CXX/drs/dr16xx.cpp
@@ -284,6 +284,54 @@ namespace dr1687 { // dr1687: 7
#endif
}
+namespace dr1690 { // dr1690: 9
+ // See also the various tests in "CXX/basic/basic.lookup/basic.lookup.argdep".
+#if __cplusplus >= 201103L
+ namespace N {
+ static auto lambda = []() { struct S {} s; return s; };
+ void f(decltype(lambda()));
+ }
+
+ void test() {
+ auto s = N::lambda();
+ f(s); // ok
+ }
+#endif
+}
+
+namespace dr1691 { // dr1691: 9
+#if __cplusplus >= 201103L
+ namespace N {
+ namespace M {
+ enum E : int;
+ void f(E);
+ }
+ enum M::E : int {};
+ void g(M::E); // expected-note {{declared here}}
+ }
+ void test() {
+ N::M::E e;
+ f(e); // ok
+ g(e); // expected-error {{use of undeclared}}
+ }
+#endif
+}
+
+namespace dr1692 { // dr1692: 9
+ namespace N {
+ struct A {
+ struct B {
+ struct C {};
+ };
+ };
+ void f(A::B::C);
+ }
+ void test() {
+ N::A::B::C c;
+ f(c); // ok
+ }
+}
+
namespace dr1696 { // dr1696: 7
namespace std_examples {
#if __cplusplus >= 201402L