Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-11-29 11:44:20


--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: "Bill Seymour" <bill-at-the-office_at_p...>
> > Peter Dimov wrote:
> > >
> > > ... every programmer needs to realize, sooner or later,
> > > that when the specification of type X says that ++x may
> > > return void, then it really may return void ...
> > >
> >
> > In accordance with what I've heard called the "principle
> > of least surprise," isn't it important that overloaded
> > operators do the same kinds of things that they do for
> > built-in types?
>
> Yes, if the type models, or is supposed to be compatible with, a
built-in
> type (or a type category.)

So far the only argument given for the use of ++ is that it's
compatible with integer types. This implies that the atomic_count is
supposed to be compatible with the built-in integer type, so we've
got problems with least surprise by your own admission in the above.

I think I've voiced my opinion thoroughly now, though, so I'll bow
out.

Bill Kempf


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