Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-09-12 03:32:21


At Thursday 2002/09/12 01:06, you wrote:
>"Jeffrey C. Jacobs" wrote:
> >
> > Oh! Good point, thanks Daniel! Consider it done:
> >
> > const volatile Integral &_T
> >
> > Of course, a const volatile (or volatile const) anything is effectively
> > saying: this value doesn't change but assume it changes frequently (don't
> > cache it),

no, it's saying "_I_ won't change it, but it may change by something you
can't see" (like the other threads)

>so although as a completist I will support it, from a language
> > POV it's sort of like saying:
> >
> > Integral & const _T
>
>Of course the & is always fixed, the 'const' and 'volatile' refer to the
>type you are refering. Using both 'const' and 'volatile' is AFAIK a
>useful thing as it says that *your* code will not change it, but another
>thread could (or if it's a hardware register etc.). This prevents the
>compiler from optimizing certain things away like moving the 'reading'
>of the variable out of a loop or removing code paths that otherwise
>would never be taken.
>
>Regards, Daniel
>
>--
>Daniel Frey
>
>aixigo AG - financial training, research and technology
>Schloß-Rahe-Straße 15, 52072 Aachen, Germany
>fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
>eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
               "There oughta be a law"


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