Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-17 14:22:49


From: "Peter Dimov" <pdimov_at_[hidden]>

> From: "David Abrahams" <dave_at_[hidden]>
> > From: "Peter Dimov" <pdimov_at_[hidden]>
> >
> >
> > > From: "David Abrahams" <dave_at_[hidden]>
> > > [quotation moved to top]
> > > > From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
> > > > > isn't this going to cause some unexpected/surprising behavior
when
> > > > someone
> > > > > tries:
> > > > >
> > > > > a[n] = someT;
> > >
> > > > No, there won't be any behavior because compilation will fail.
> > >
> > > It is not guaranteed to fail. operator[] returns a non-const
value_type,
> > and
> > > rvalues of class types are assignable.
> >
> > Good point. Should the return type be const?
>
> I think so, at least for conforming compilers. Borland C++, in
particular,
> often has problems with cv qualifiers (argument deduction doesn't strip
> them.)

Okay, you seem to know what to do; please feel free to make the change.
-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