1 // PR c++/71875
2 // { dg-do link { target c++14 } }
3 
4 template <typename T>
5 constexpr bool IsMatrix = false;
6 
7 template<typename TElem>
8 class Matrix {};
9 
10 template <typename TElem>
11 constexpr bool IsMatrix<Matrix<TElem>> = true;
12 
13 template<typename TNestVec>
14 class RowVecExpMatrix;
15 
16 template <typename TNestVec>
17 constexpr bool IsMatrix<RowVecExpMatrix<TNestVec>> = true;
18 
19 int
main()20 main ()
21 {
22   static_assert (IsMatrix<RowVecExpMatrix<Matrix<int>>>, "Matrix check error");
23   static_assert (IsMatrix<Matrix<int>>, "Input type is not a matrix");
24 }
25