Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2003-04-17 03:46:54


In article <b7la7k$nci$1_at_[hidden]>, Lucas Galfaso
<lgalfaso_at_[hidden]> writes
>"Kevlin Henney" <kevlin_at_[hidden]> wrote in message
>news:02DZoaAh3Xn+Ewtg_at_curbralan.com...
>> >
>> >[1] const T & ref;
>> >means that the data type referred to by ref is constant (i.e. you cannot
>> >modify its internal state).
>>
>> >[2] T & const ref;
>> >means that the *reference* is constant.
>> >
>> >[3] const T & const ref;
>> >both reference and data type are constant.
>>
>> The fundamental difference is that [1] is legal and both [2] and [3] are
>> illegal: you cannot cv-qualify a reference.
>
>Not exactly
>[2] IS legal as is equivalent to [1]

No, exactly. The standard is quite clear on this [8.3.2/1]. If you are
still convinced you are right, I suggest pursuing this topic on
comp.std.c++ rather than on Boost.

Kevlin
____________________________________________________________

  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