|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-08-01 10:58:09
----- Original Message -----
From: "Daniel Frey" <daniel.frey_at_[hidden]>
> > Now, that item says that operator+() and others returning a const
object
> > is "The Right Thing To Do" because it prevents you from doing silliness
> > such as
> >
> > (a + b) = c
> >
> > which is not allowed on native types and therefore, by extension,
should
> > not be allowed on user-defined types.
>
> This is one of the extensions I suggested for operators.hpp. I thought
> that discussing general programming guide-lines would lead to the
> authors of the libraries to adapt them. Seems I'm wrong about this.
I have mixed feelings about the above restriction. I've never written
silliness like the above by mistake, and I can think of cases using
expression templates where it might even be a sensible thing to write.
> Dave, what is the current status of the proposal for the
> operators.hpp-changes? Are you still waiting for Aleksey's and Daryle's
> agreement?
Yep. I've been incredibly busy, and although I looked over the changes
quickly I didn't hear enough definitive yay/nay feedback from other
concerned parties to make it worth incorporating them at this stage. Also,
I think you hadn't completed the docs.
> I asked both Jeremy and John about the Borland fixes, but
> Jeremy had no time (and wasn't the originator of the Borland fixes) and
> John (who provided the fixes) wasn't interested in maintaining them. He
> thinks (and I agree with him), that the changes are OK and we should
> wait if some Borland users complain. My part should be a better
> documentation, but I didn't considered it worth another post (I have it
> at home, so I can provide it on request tomorrow evening if you like).
If you put everything together with decent updated docs and you can get
your changes to pass all the operators-specific regressions, I'll be happy
to give my OK on the integration. (I'd like it if you could test on all
freely available compilers for your platform, so if you're on Windows that
would include Borland). In theory I'm on vacation until 8/11, so you might
have to get someone else to apply the patches.
-Dave
-----------------------------------------------------------
David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk