4 // { dg-require-effective-target c++11 }
6 template < typename > struct traits;
7 template < typename, int _Rows, int _Cols, int = 0, int = _Rows,
8 int = _Cols > class Matrix;
9 template < typename > class G;
10 template < typename Derived > struct A {
11 typedef G < Derived > type;
14 template < typename Derived > class C {
16 enum { RowsAtCompileTime =
17 traits < Derived >::RowsAtCompileTime } static Zero;
20 template < typename Derived > class G:public C < Derived > {
23 template < int _Rows > class D {
30 template < typename Derived > class PlainObjectBase:public A < Derived >::type {
31 typedef typename A < Derived >::type Base;
32 D < Base::RowsAtCompileTime > m_storage;
36 return m_storage.rows();
43 static long run(long x, long) {
53 template < typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
55 struct traits <Matrix < _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >> {
56 enum { RowsAtCompileTime = _Rows };
59 template < typename, int, int, int, int _MaxRows, int _MaxCols >
60 class Matrix:public PlainObjectBase < Matrix < double, _MaxRows,
63 template < typename OtherDerived > Matrix(OtherDerived);
67 static Matrix < double, 2, 2 > run(long size) {
68 Matrix < double, 2, 2 > diag = Matrix < double, 2, 2 >::Zero;
71 long randomInt = fn2(-1);
75 double alpha(randomInt);
85 void fn3(Matrix < double, 2, 2 > m)