Several compilation fixes for MSVC and NVCC, basically:

- added explicit enum to int conversion where needed
- if a function is not defined as declared and the return type is "tricky"
  then the type must be typedefined somewhere. A "tricky return type" can be:
  * a template class with a default parameter which depends on another template parameter
  * a nested template class, or type of a nested template class
This commit is contained in:
Gael Guennebaud
2008-07-29 16:33:07 +00:00
parent e0215ee510
commit 842c4f8bfa
17 changed files with 219 additions and 207 deletions

View File

@@ -240,4 +240,13 @@ template<unsigned int Flags> struct ei_are_flags_consistent
};
};
/** \internal Gives the type of a sub-matrix or sub-vector of a matrix of type \a ExpressionType and size \a Size
* TODO: could be a good idea to define a big ReturnType struct ??
*/
template<typename ExpressionType, int RowsOrSize=Dynamic, int Cols=Dynamic> struct BlockReturnType {
typedef Block<ExpressionType, (ei_traits<ExpressionType>::RowsAtCompileTime == 1 ? 1 : RowsOrSize),
(ei_traits<ExpressionType>::ColsAtCompileTime == 1 ? 1 : RowsOrSize)> SubVectorType;
typedef Block<ExpressionType, RowsOrSize, Cols> Type;
};
#endif // EIGEN_META_H