Boost logo

Boost :

From: Jeffrey C. Jacobs (darklord_at_[hidden])
Date: 2002-09-11 15:27:59


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), so although as a completist I will support it, from a language
POV it's sort of like saying:

Integral & const _T

In other words, _T is an reference to some value, and the reference is a
constant reference and therefore _T can refer to nothing else, which is
redundant since references are always fixed. :) OTOH, this:

Integral & volatile _T

Would really give me shivers!! Imagine a reference to some value though
which value it refers to may change frequently, therefore don't cache it.
LOL! I would be a hoot to support such a concept but anyway, you sold me on
"const volatile" so let's just leave it at that and let the "constant
reference" / "volatile reference" return to the depths of C++ folklore (as
well as "const volatile reference" I leave as an exercize for the reader.
:)

Jeffrey.

P.S. Updated code at:

http://groups.yahoo.com/group/boost/files/TimeHorse/sign_traits.hpp

"Daniel Frey" <daniel.frey_at_[hidden]> wrote in message
news:3D7F5690.E21FFA45_at_aixigo.de...
"Jeffrey C. Jacobs" wrote:
>
> assign to it) so it seems the most logical. That having been said, the
> current implementation for [un]signed_cast has:
>
> Integral _T
> Integral &_T
> const Integral &_T
> volatile Integral &_T

Note that you forgot

  const volatile Integral &_T

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

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