Commit da31baba by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/71875 (template specialization compile error)

	PR c++/71875
	* g++.dg/cpp1y/pr71875.C: New test.

From-SVN: r253613
parent 24f8d391
2017-10-10 Jakub Jelinek <jakub@redhat.com> 2017-10-10 Jakub Jelinek <jakub@redhat.com>
PR c++/71875
* g++.dg/cpp1y/pr71875.C: New test.
PR c++/77578 PR c++/77578
* g++.dg/gomp/pr77578.C: New test. * g++.dg/gomp/pr77578.C: New test.
......
// 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");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment