Boost logo

Boost :

From: Martin Bonner (martin.bonner_at_[hidden])
Date: 2006-08-04 07:00:16


----Original Message----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Peter Dimov Sent:
04 August 2006 11:39 To: boost_at_[hidden]
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_at_[hidden]
Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ,
ENGLAND Tel: +44 (0)1223 203894

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk