Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2002-10-30 11:00:42

Richard Hadsell wrote:
> Daniel Frey wrote:
> >
> > While we are at it: Where can I find the discussion that resulted in
> > this code? I tried to search the archive but couldn't find it. It seems
> > really strange to me how it is done. ...
> You started a thread last July titled "Syntactic sugar for scoped_ptr." I

Are you mixing up "Brey" and "Frey"? I don't remember anything like

> didn't notice any discussion of the implementation. The current solution
> doesn't bother me at all. I'm guessing that it gets the job done on all
> compilers with no warning messages.

That's OK for me...

> I would just be more confident in it, if I saw some documentation that backed it
> up. Since it was not mentioned, I was concerned that it might be experimental
> code that slipped in by mistake.

And I would be even more happy if the documentation would mention why
'operator bool()' alone isn't a good idea (that's obvious) and why the
"obvious" solution to add a private 'operator int()' doesn't solve the
problem and thus why the funny trick with 'unspecified_bool_type' is
needed. It may be a valuable idiom to remember. Another question which
comes to my mind: Why is the typedef for 'unspecified_bool_type' public?
Shouldn't it be private like other implementation details?

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:

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