[Insight-developers] Help With a Warning

kent williams norman-k-williams at uiowa.edu
Fri Jul 18 09:40:38 EDT 2008


I'd say this warning is a GCC bug.  If you trace the inheritance chain:

DIFFUSIONTENSOR3D:
template<class T>
DiffusionTensor3D<T>
::DiffusionTensor3D( const ComponentArrayType r
):SymmetricSecondRankTensor<T,3>(r)
{
}

SYMMETRICSECONDRANKTENSOR:
// typedef FixedArray<TComponent,
//   itkGetStaticConstMacro(InternalDimension)> BaseArray;
SymmetricSecondRankTensor(const ComponentArrayType r): BaseArray(r) {}

//FIXEDARRAY
template <typename TValueType, unsigned int VLength>
FixedArray<TValueType, VLength>
::FixedArray(const ValueType r[VLength])
{
  ConstIterator input = r;
  for(Iterator i = this->Begin() ; i != this->End() ;) *i++ = *input++;
}

At no stage in climbing the constructor ladder is there any conversion
between const and non-const.

This points out one disadvantage of C++ templates: with any sufficiently
complex templated type, the compiler can't provide a meaningful line number
and error/warning for code to which it objects.

On 7/17/08 6:35 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:

> Luis,
> 
> I have looked at this warning on and off for the last 6 months. It is
> beyond my c++ expertise. Any ideas?
> 
> http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=125951
> 
> 
> Bill
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list