aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-10-10 22:10:00 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2017-10-10 22:10:00 +0200
commitda31baba47d88a9c2f78a3dbe5585541b96cf2c3 (patch)
tree3affc21a7b2c3ec5178562451828e067fb49e04c
parent24f8d3916c6cd4e072a0eeedfb39b625cef9b0ee (diff)
downloadgcc-da31baba47d88a9c2f78a3dbe5585541b96cf2c3.zip
gcc-da31baba47d88a9c2f78a3dbe5585541b96cf2c3.tar.gz
gcc-da31baba47d88a9c2f78a3dbe5585541b96cf2c3.tar.bz2
re PR c++/71875 (template specialization compile error)
PR c++/71875 * g++.dg/cpp1y/pr71875.C: New test. From-SVN: r253613
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr71875.C24
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7e52744..307acde 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2017-10-10 Jakub Jelinek <jakub@redhat.com>
+ PR c++/71875
+ * g++.dg/cpp1y/pr71875.C: New test.
+
PR c++/77578
* g++.dg/gomp/pr77578.C: New test.
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr71875.C b/gcc/testsuite/g++.dg/cpp1y/pr71875.C
new file mode 100644
index 0000000..4d31796
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr71875.C
@@ -0,0 +1,24 @@
+// PR c++/71875
+// { dg-do link { target c++14 } }
+
+template <typename T>
+constexpr bool IsMatrix = false;
+
+template<typename TElem>
+class Matrix {};
+
+template <typename TElem>
+constexpr bool IsMatrix<Matrix<TElem>> = true;
+
+template<typename TNestVec>
+class RowVecExpMatrix;
+
+template <typename TNestVec>
+constexpr bool IsMatrix<RowVecExpMatrix<TNestVec>> = true;
+
+int
+main ()
+{
+ static_assert (IsMatrix<RowVecExpMatrix<Matrix<int>>>, "Matrix check error");
+ static_assert (IsMatrix<Matrix<int>>, "Input type is not a matrix");
+}