From: Kevlin Henney (kevlin_at_[hidden])
Date: 2003-04-16 10:59:29
In article <BAY7-F60sAuwsd1C5vK00008129_at_[hidden]>, Reece Dunn
>If I understand the ISO/IEC C++98 standard correctly:
> const T & ref;
>means that the data type referred to by ref is constant (i.e. you cannot
>modify its internal state).
To be precise, you cannot modify the object referred to by ref via ref:
it may be a non-const object, in which case it could change, just not
via the ref.
> T & const ref;
>means that the *reference* is constant.
> const T & const ref;
>both reference and data type are constant.
The fundamental difference is that  is legal and both  and  are
illegal: you cannot cv-qualify a reference.
Kevlin Henney phone: +44 117 942 2990
mailto:kevlin_at_[hidden] mobile: +44 7801 073 508
http://www.curbralan.com fax: +44 870 052 2289
Curbralan: Consultancy + Training + Development + Review
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk