aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C
new file mode 100644
index 0000000..1f6cb8f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C
@@ -0,0 +1,12 @@
+// The standard is unclear about whether this testcase is well-formed.
+// Clang considers it well-formed, EDG not. Let's go with EDG for now.
+// { dg-do compile { target c++11 } }
+
+template <class T>
+using foo = typename T::bar; // { dg-error "this context" }
+
+class B
+{
+ typedef int bar; // { dg-error "private" }
+ foo<B> f; // { dg-message "required" }
+};