From da31baba47d88a9c2f78a3dbe5585541b96cf2c3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 10 Oct 2017 22:10:00 +0200 Subject: [PATCH] re PR c++/71875 (template specialization compile error) PR c++/71875 * g++.dg/cpp1y/pr71875.C: New test. From-SVN: r253613 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/cpp1y/pr71875.C | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1y/pr71875.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7e52744c9f2..307acde68c8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2017-10-10 Jakub Jelinek + 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 00000000000..4d317966cea --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr71875.C @@ -0,0 +1,24 @@ +// PR c++/71875 +// { dg-do link { target c++14 } } + +template +constexpr bool IsMatrix = false; + +template +class Matrix {}; + +template +constexpr bool IsMatrix> = true; + +template +class RowVecExpMatrix; + +template +constexpr bool IsMatrix> = true; + +int +main () +{ + static_assert (IsMatrix>>, "Matrix check error"); + static_assert (IsMatrix>, "Input type is not a matrix"); +} -- 2.30.2