[Insight-developers] vs8 and templates
Alexandre GOUAILLARD
agouaillard at gmail.com
Wed Jun 22 12:44:06 EDT 2011
dear all,
I m trying to address the following errors:
and it boils down to vs8 no being able to match types.
in itkvector.h for example we have this:
(T is the first template of the class)
typedef T ValueType;
typedef typename NumericTraits< ValueType >::RealType RealValueType;
then
RealValueType GetSquaredNorm( void ) const
in itkVector.txx we have:
template< class T, unsigned int TVectorDimension >
typename Vector< T, TVectorDimension >::RealValueType
Vector< T, TVectorDimension >
::GetSquaredNorm(void) const
and vs8 does not seem to match the return type
now if I explicitly replace the return type like this in the definition:
template< class T, unsigned int TVectorDimension >
typename NumericTraits< T >::RealType
Vector< T, TVectorDimension >
::GetSquaredNorm(void) const
then it compiles, but it seems a little bit brutal.
Is there any better workaround?
Am I missing something?
alex.
More information about the Insight-developers
mailing list