[Insight-developers] VS2010 and itkStdAlgorithm

Williams, Norman K norman-k-williams at uiowa.edu
Thu Apr 25 15:26:41 EDT 2013


I would lean towards trying to get the test right, but if it's the
collective wisdom of my betters to just ditch copy_n entirely, go for it.


Wasn't it you who suggested using copy_n in the first place, Bradley? ;-)

On 4/25/13 12:21 PM, "Bradley Lowekamp" <blowekamp at mail.nih.gov> wrote:

>Kent,
>
>Getting these details just right is going to be a pain.
>
>Would you mind if I made a patch to replace usage of copy_n with
>std::copy and removed itkStdAlgorithm.h?
>
>Brad
>
>On Apr 25, 2013, at 9:12 AM, Bradley Lowekamp <blowekamp at mail.nih.gov>
>wrote:
>
>> Niels,
>>
>> It would solve your problem. But.. why was it added?
>>
>> $ git log Modules/Core/Common/include/itkStdAlgorithm.h
>> commit 137b5c35a733782cb443a19ef4901520e98bac98
>> Author: Kent Williams <norman-k-williams at uiowa.edu>
>> 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 <niels-xtk at xs4all.nl> 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



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list