
----Original Message---- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov Sent: 04 August 2006 11:39 To: boost@lists.boost.org Subject: Re: [boost] Portable signbit macro/function?
Johan RĂ¥de wrote:
I still find it hard to believe that the volatile are needed ;-)
It is not.
If volatile is not present, then you can't instantiate the template with T="volatile float" for example. (Similarly you need the "const" so that you can invoke with T="const float".) I suspect that for this application that doesn't matter, but that Gennaro was so used to using the safe form: reinterpret_cast<const volatile char*>(&s) to get at the bytes of an object in a template, that he just wrote it automatically. -- Martin Bonner Martin.Bonner@Pitechnology.com Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 203894