[Insight-developers] Compiling with c++0x patch

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Dec 29 10:43:02 EST 2011


Hello David,


Did you run into this problem when you build ITK with this flag or when this flag was added to an application which uses ITK?

I believe there is a try compile for usage of this feature in VXL, so if you compile both your application and ITK with this flag it may work?

Brad

On Dec 28, 2011, at 8:40 PM, David Doria wrote:

> If I enable the c++0x flag, I get lots of "error: ‘constexpr’ needed
> for in-class initialization of static data member ‘float_sqrteps’ of
> non-integral type" errors in vxl/core/vnl/vnl_numeric_traits.h and
> vnl_math.h. It seems like float in-class initialization are deprecated by gcc
> (the last item here:http://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html)
> 
> Moving these initialization outside of the class body fixes the errors.
> 
> http://review.source.kitware.com/#/c/3583/
> 
> It didn't seem to me like the VCL_STATIC_CONST_INIT_FLOAT_DECL macro
> was doing anything, and it wouldn't compile with it once I moved the
> initializations, but it seems to compile and work fine at least on
> gcc.
> 
> What is the procedure for pushing this upstream if it seems
> reasonable? I really think we should allow code that uses ITK to use
> c++0x.
> 
> 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

========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20111229/e0f9c733/attachment.htm>


More information about the Insight-developers mailing list