
20 Aug
2009
20 Aug
'09
7:32 p.m.
on 20.08.2009 at 21:55 joel wrote :
(i hope i got it right) but this implementation does not allow to define different interfaces for differently tagged entities, does it? SFINAE and partial specilization allow this yes. matrix<double> m; matrix<double, settings( OfSize<4,4> ) > n; m.resize( ofSize(6,6) ); // works n.resize( ofSize(6,6) ); // don't works : no matching function matrix<...>::resize( dimen<N,D> const&) another example i think we agreed that a 'symmetry' concept must be handled and as i suppose a symmetric matrix is always square how you would handle such illegal attempts?
matrix<double, settings( symmetric ) > m; m.resize( ofSize(6,7) ); (i just thought: maybe restricting to 'm.resize( ofSize(6) );' ?) -- Pavel