[Insight-developers] API change of vnl_math to namespace

Matt McCormick matt.mccormick at kitware.com
Wed Oct 31 18:12:11 EDT 2012


Peter,

Would it be possible to get backwards-compatibility macros like

#define vnl_math_abs vnl_math::abs

?

Thanks,
Matt

On Wed, Oct 31, 2012 at 10:03 PM, Matt McCormick
<matt.mccormick at kitware.com> wrote:
> Hans, Bill,
>
> I agree that we should try to use the std:: versions whenever possible
> if we have to make the change.
>
> However, in many cases, we will likely want to use vnl_math version
> because it provides overloaded versions for all the various plain old
> datatypes.  If we go with std, the options are more limited or the C
> version is available but with a different function name per type.
>
>   http://www.cplusplus.com/reference/clibrary/cmath/abs/
>
> Thanks,
> Matt
>
> On Wed, Oct 31, 2012 at 9:56 PM, Johnson, Hans J <hans-johnson at uiowa.edu> wrote:
>> I'd also prefer to use std::abs (and std::????) whenever possible.
>>
>> Hans
>>
>>
>> From: Bill Lorensen <bill.lorensen at gmail.com>
>> Date: Wednesday, October 31, 2012 9:55 PM
>> To: Sean McBride <sean at rogue-research.com>
>> Cc: "vxl-users at lists.sourceforge.net" <vxl-users at lists.sourceforge.net>, ITK
>> <insight-developers at itk.org>
>> Subject: Re: [Insight-developers] API change of vnl_math to namespace
>>
>> Is there any reason for us to be using vnl_math?
>>
>> On Wed, Oct 31, 2012 at 5:02 PM, Sean McBride <sean at rogue-research.com>
>> wrote:
>>>
>>> On Wed, 31 Oct 2012 20:47:57 +0000, Matt McCormick said:
>>>
>>> >Hi,
>>> >
>>> >Recently, changes were made in vnl_math.h so that vnl_math_abs is now
>>> >vnl_math::abs, etc.
>>> >
>>> >This is causing pain in ITK :-(.
>>> >
>>> >What is the recommended way to deal with this change in a
>>> >backwards-compatible way?  I could not find pre-processor version
>>> >definitions in core/vnl/vnl_config.h or core/vxl_config.h
>>>
>>> This is partly my fault... and is ironic because the change was meant to
>>> *help* ITK. :(
>>>
>>> I submitted a patch to the vxl folks based on this:
>>> <http://review.source.kitware.com/#/c/6025/>
>>>
>>> see the thread "Patch from ITK (Avoid C++0x constexpr error)" on the vxl
>>> list.  After some discussion about whether to accept the patch or not, it
>>> was accepted (but expanded on!) and committed in r35854 (and perhaps
>>> others).
>>>
>>> I'm not sure why Peter made even more extensive changes... Peter?
>>>
>>> Cheers,
>>>
>>> --
>>> ____________________________________________________________
>>> Sean McBride, B. Eng                 sean at rogue-research.com
>>> Rogue Research                        www.rogue-research.com
>>> Mac Software Developer              Montréal, Québec, Canada
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>>
>>
>>
>> ________________________________
>> 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.
>> ________________________________
>>
>> _______________________________________________
>> 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