aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-nonstatic1.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-nonstatic1.C b/gcc/testsuite/g++.dg/cpp0x/decltype-nonstatic1.C
new file mode 100644
index 0000000..bc488ff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-nonstatic1.C
@@ -0,0 +1,16 @@
+// PR c++/100205
+// { dg-do compile { target c++11 } }
+
+struct coordinate_matrix {
+ using index_t = unsigned;
+ struct convert_to_matrix_coordinate {
+ index_t column_id;
+ };
+ index_t column_id;
+
+ // does not work
+ using value_type2 = decltype(convert_to_matrix_coordinate{column_id});
+
+ // does work
+ using value_type5 = decltype(column_id);
+};