[Insight-developers] itkSetMacro with STL types

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 14 18:23:33 EDT 2011


David,

Two options come to mind:

A) Create a variant of itkSetMacro that doesn't call
     the DebugMacro

or

B)  Create a trait that indicates whether the Type has the
      stream << operator overloaded, and depending on that
      trait condition the print statement inside of the DebugMacro.


There are probably other and smarter options out there...    :-)


     Luis

--------------------------------------------------
On Thu, Apr 14, 2011 at 3:32 PM, David Doria <daviddoria at gmail.com> wrote:
> On Thu, Apr 14, 2011 at 3:29 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> You would need to implement <<  for set<int>
>
> Sure, that'll fix it, but it seems like you should be able to use the
> SetMacro even for types which cannot be output. Could a few << operators for
> set, vector, etc be included somewhere to at least catch these common cases?
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
>


More information about the Insight-developers mailing list