Hi Philip and Peter, Yes, thank you. These definitions would be very helpful.
A way to move forward could be a ITK_LEGACY_REMOVE variable defined in the CMakeLists.txt: option(VXL_LEGACY_REMOVE "Remove legacy code for backwards compatibility." OFF) mark_as_advanced(VXL_LEGACY_REMOVE) In core/vxl_config.h.in #cmakedefine VXL_LEGACY_REMOVE @VXL_LEGACY_REMOVE@ and surround the compatibility with a "#if !defined( VXL_LEGACY_REMOVE )". Thanks, Matt On Wed, Nov 14, 2012 at 2:38 PM, Philip Tresadern <[email protected]> wrote: > I can confirm that adding the following macros directly to vnl_math.h work > (at least under Visual Studio 2005): > > #define vnl_math_isnan vnl_math::isnan > #define vnl_math_isinf vnl_math::isinf > #define vnl_math_isfinite vnl_math::isfinite > #define vnl_math_rnd_halfinttoeven vnl_math::rnd_halfinttoeven > #define vnl_math_rnd_halfintup vnl_math::rnd_halfintup > #define vnl_math_rnd vnl_math::rnd > #define vnl_math_floor vnl_math::floor > #define vnl_math_ceil vnl_math::ceil > #define vnl_math_abs vnl_math::abs > #define vnl_math_max vnl_math::max > #define vnl_math_min vnl_math::min > #define vnl_math_sqr vnl_math::sqr > #define vnl_math_cube vnl_math::cube > #define vnl_math_sgn vnl_math::sgn > #define vnl_math_sgn0 vnl_math::sgn0 > #define vnl_math_squared_magnitude vnl_math::squared_magnitude > #define vnl_math_cuberoot vnl_math::cuberoot > #define vnl_math_hypot vnl_math::hypot > > If the aim is to minimize disruption, this would be my recommendation; if the > aim is to persuade all users to migrate to the namespace version, however, > then an '#if legacy' or separate include file might give them the nudge they > require. > > Phil. > >> -----Original Message----- >> From: Peter Vanroose [mailto:[email protected]] >> Sent: 14 November 2012 08:27 >> To: Matt McCormick; Johnson, Hans J >> Cc: [email protected]; Bill Lorensen; ITK >> Subject: Re: [Vxl-users] API change of vnl_math to namespace >> >> >> >> Matt McCormick wrote: >> > Would it be possible to get backwards-compatibility macros like >> > #define vnl_math_abs vnl_math::abs ? >> >> Yes, of course. Good idea. >> I suppose this can go in core/vnl_math.h Or would a kind of "#if legacy..." >> switch be the preferred way? Or maybe a separate include file, say >> vnl_math_oldstyle.h ? >> >> -- Peter. >> >> ------------------------------------------------------------------------------ >> Monitor your physical, virtual and cloud infrastructure from a single web >> console. Get in-depth insight into apps, servers, databases, vmware, SAP, >> cloud infrastructure, etc. Download 30-day Free Trial. >> Pricing starts from $795 for 25 servers or applications! >> http://p.sf.net/sfu/zoho_dev2dev_nov >> _______________________________________________ >> Vxl-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/vxl-users _______________________________________________ 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
