Niels, It would solve your problem. But.. why was it added?
$ git log Modules/Core/Common/include/itkStdAlgorithm.h commit 137b5c35a733782cb443a19ef4901520e98bac98 Author: Kent Williams <[email protected]> Date: Wed Apr 17 09:57:37 2013 -0500 COMP: Further changes to the use of std::copy_n 1. Add preprocessor test for condition (detected by David Doria) where ITK was configured & built with a compiler that supports C++11 std::copy_n, but a user program was not. 2. Small changes suggested by Bradley Lowencamp that didn't make it into the last patch. Change-Id: I1635cccc52b2dbf3621b896db9a139f33cda4fe2 So doing the change you suggest would undo this bug fix and this prior work. The the problem presented above is that ITK was compiled with a newer version of C++ then an application... So the solution is to make sure the version of C++ the compiler supports at build time is greater than to equal to that used during configuration. 1) A small program an be compiled and run during cmake configuration to get the __cplusplus values into a cmake variable. 2) This variable can be placed into the itkConfigure.h.in configuration file as say ITK__CPLUSPLUS 3) Using C preprocess it can be checked if __cplusplus >= ITK__CPLUSPLUS Brad On Apr 25, 2013, at 8:59 AM, Niels Dekker <[email protected]> wrote: > On 2013-04-25 14:39, Bradley Lowekamp wrote: >> 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. > > Sorry, Brad, I don't really understand this solution. Wouldn't it be > sufficient to just remove the line which says "#error ITK built with C++11, > current source file is not." from itkStdAlgorithm.h? > > Kind regard, Niels > _______________________________________________ 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
