Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-01-03 20:16:44

"Dan W." <danw_at_[hidden]> wrote in message
> Deane Yang wrote:
> > In fact, my vote is to have no automatic conversion of units at all.
> > I just want the compiler to throw up an error message every time
> > it finds an inconsistent use of units. I find that within any given
> > module, I always want to use a consistent set of units, even if in
> > theory I could use a units library to convert everything automatically
> > into a consistent set of units. The use of inconsistent units in
> > a single line of code for me is a signal that I have poorly organized
> > and error-prone code. Am I the only one that feels this way?
> Amen. Probably 80% of all C++ blues originate with automatic
> conversions, like between int and float, or int and unsigned int. And I
> wish everybody working on libraries would configure their hot-keys to
> paste "explicit " on, say, Alt-[space-bar]...

First... Apologies for calling you Dan.T Dan. W.

explicit if overused is just another implicit
static_cast, dynamic_cast etc provide a better more diverse precursor for
name over structure seems to work better in template coding... it can
provide a more explicit contract

Andy Little

Boost list run by bdawes at, gregod at, cpdaniel at, john at