[Insight-developers] VS2010 and itkStdAlgorithm

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Apr 25 08:39:27 EDT 2013


One more thing,

I think the solution to this problem to obtain the __cplusplus version at CMake configuration time, stash it in a variable to be used in a configuration file, and make sure that it is always greater than or equal to that in the itkConfigure.h.in file.

Brad

On Apr 25, 2013, at 7:51 AM, Niels Dekker <niels-xtk at xs4all.nl> wrote:

> On 2013-04-25 13:24, Marius Staring wrote:
>> My VS2010 cannot build the latest ITK git due to the changes wrt
>> itkStdAlgorithm.
> ...
>> http://open.cdash.org/viewBuildError.php?buildid=2886200
> 
> I guess it goes wrong here in itkStdAlgorithm.h (www.itk.org/Doxygen/html/itkStdAlgorithm_8h_source.html):
> 
>  #if defined(ITK_HAS_STD_COPY_N)
>  #if defined(__cplusplus) && (__cplusplus <= 199711L)
>  #error ITK built with C++11, current source file is not.
>  #endif
>  #endif
> 
> 
> Microsoft Visual Studio 2010 does have std::copy_n, so I guess ITK_HAS_STD_COPY_N is defined. However, Visual Studio 2010 was shipped before the C++11 standard, so for this compiler, __cplusplus is still 199711L.
> 
> I'd suggested removing the #error from itkStdAlgorithm.h.
> 
> My 2 cents, Niels
> -- 
> Niels Dekker
> http://www.xs4all.nl/~nd/dekkerware
> Scientific programmer at LKEB, Leiden University Medical Center
> 
> _______________________________________________
> 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.php
> 
> 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