|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-08-17 12:58:39
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?
-----------------------------------------------------------
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