[Insight-users] Clang++ compilation errors

Amit Kulkarni amitkulz at gmail.com
Wed Feb 16 18:58:46 EST 2011


Hello,

While using clang++ -current on ITK (actually the ITK included in
Orfeo -current toolbox), I get these errors...

/datamir/OTB/Utilities/ITK/Code/Numerics/itkRegularStepGradientDescentBaseOptimizer.cxx:50:34:
error:
      too many arguments to function call, expected 0, have 1
  m_StopConditionDescription.str("");
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~
/datamir/OTB/Utilities/ITK/Code/Numerics/itkRegularStepGradientDescentBaseOptimizer.cxx:67:34:
error:
      too many arguments to function call, expected 0, have 1
  m_StopConditionDescription.str("");
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~
/datamir/OTB/Utilities/ITK/Code/Numerics/itkRegularStepGradientDescentBaseOptimizer.cxx:284:10:
error:
      member function 'str' not viable: 'this' argument has type 'const
      itk::OStringStream', but function is not marked const
  return m_StopConditionDescription.str();


The root problem for zillions of these same couple of errors in
Code/Numerics is in Utilities/ITK/Code/Common/itkMacro.h where class
OStringStream is defined. What would you recommend to fix these
errors? gcc takes them all without complaint.

Thanks
P.S I have some patches to apply against ITK due to clang++ finding
out these errors and others.


More information about the Insight-users mailing list