[Insight-users] Fails to compile itkGetConstObjectMacro in Debug mode

Mengda Wu wumengda at gmail.com
Wed May 6 01:54:22 EDT 2009


Hi all,

   I have a problem in using itkGetConstObjectMacro under Debug mode (gcc).
This problem comes from its definition in
itkMacro.h<http://www.itk.org/Doxygen/html/itkMacro_8h-source.html>
.

  virtual const type & Get##name () const \
  { \
    itkDebugMacro("returning " << #name " of " << this->m_##name ); \
    return this->m_##name; \
  }

  Because itkDebugMacro wants to print the value of "this->m_##name", it
fails to compile when "this->m_##name" is a "complex" type,
say: std::map. Maybe we could remove the need to print "this->m_##name".

  The issue in other macros, such as

itkGetConstMacro<http://www.itk.org/Doxygen/html/itkMacro_8h.html#89294335d94b115d40e2603f2fff7950>
itkGetConstObjectMacro<http://www.itk.org/Doxygen/html/itkMacro_8h.html#d11f8adb47609be2b4b58948904f8a7c>
itkGetConstReferenceObjectMacro<http://www.itk.org/Doxygen/html/itkMacro_8h.html#5c9ee7ba633b007afc64326065fa9243>
itkGetMacro<http://www.itk.org/Doxygen/html/itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf>
itkGetObjectMacro<http://www.itk.org/Doxygen/html/itkMacro_8h.html#f6bef9ee7e4c077b96a08848ed4e7660>


Thanks,
Mengda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090505/f83d1efc/attachment.htm>


More information about the Insight-users mailing list