[ITK] ITK_NULLPTR and ITK_OVERRIDE on VS2012+

Matt McCormick matt.mccormick at kitware.com
Wed Jan 7 13:12:26 EST 2015


Hi,

It looks like this is a known issue in VS 2013 that is not going to be
addressed [1].  We should probably find a work-around.  Newer CMake
has better support for this [2], but we do not yet require CMake 3.
try_compile's make the initial configuration time longer, but we'll
have to use them if necessary.

Thanks,
Matt


[1] https://connect.microsoft.com/VisualStudio/feedback/details/763051/a-value-of-predefined-macro-cplusplus-is-still-199711l

[2] http://www.cmake.org/cmake/help/v3.1/manual/cmake-compile-features.7.html

On Tue, Dec 23, 2014 at 2:31 PM, Мар'ян Климов <nekto1989 at gmail.com> wrote:
> Hi,
>
> Even latest VS2013 has __cplusplus defined to 199711L. I just changed second
> compiler from mingw to mingw-w64 and GCC 4.9.2 found some problems in code
> because of ITK_OVERRIDE that was ignored by VS and mingw32.
>
> Marian
>
> 2014-12-23 18:36 GMT+02:00 Bradley Lowekamp <blowekamp at mail.nih.gov>:
>>
>> Hello,
>>
>> Yes you could be done with CMake try compiles an what not.
>>
>> Checking to see if the C++ version is C++11 seems reasonable. Is this
>> causing any problems?
>>
>> Brad
>>
>> On Dec 23, 2014, at 5:36 AM, Мар'ян Климов <nekto1989 at gmail.com> wrote:
>>
>> > Hi,
>> >
>> > I've found out that ITK defines ITK_NULLPTR to NULL instead of nullptr
>> > and ITK_OVERRIDE to nothing. This happens in itkMacro.h. Can't this be done
>> > in some other way like check for HAS_OVERRIDE, HAS_NULLPTR instead of
>> > checking for __cplusplus?
>> >
>> > Best regards,
>> > Marian
>> > _______________________________________________
>> > Community mailing list
>> > Community at itk.org
>> > http://public.kitware.com/mailman/listinfo/community
>>
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list