[Insight-developers] assert and explicit instantiations

Stephen Aylward stephen.aylward at kitware.com
Sun Jun 14 11:38:59 EDT 2009


Aren't asserts discouraged?

Should this instead be an exception?

Stephen

On Sun, Jun 14, 2009 at 10:16 AM, Peter Cech<pcech at vision.ee.ethz.ch> wrote:
> On Sun, Jun 14, 2009 at 01:58:40PM +0200, Gaëtan Lehmann wrote:
>>
>> Hi Julien,
>>
>> I have commented an assert() in
>>
>>   Code/Common/itkTreeIteratorBase.h
>>   Code/Common/itkTreeIteratorBase.h
>>
>> to fix build with explicit instantiation.
>> The compiler was giving that error:
>>
>> /export/home/glehmann/src/Insight/Code/Common/itkTreeIteratorBase.h:
>> 182: erreur: ?assert? was not declared in this scope
>
> That's usually a sign of missing include for assert:
>
>  #include <cassert>
>
> Regards,
> Peter
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.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
>



-- 
Stephen R. Aylward, Ph.D.
Director of Medical Imaging
Kitware, Inc. - North Carolina Office
http://www.kitware.com
(518) 371-3971 x300


More information about the Insight-developers mailing list