Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-05-31 00:21:02


In message <802568EF.00713157.00_at_[hidden]>, Jon Jagger
<jon.jagger_at_[hidden]> writes
>Hi,
>I'm sure it's just me not knowing some obscure corner of C++, but what is a
>mutable reference?
>
>> template <class X, class Y>
>> struct tied
>> {
>> tied(X& x, Y& y) : m_x(x), m_y(y) {}
>>
>> template <class T1, class T2>
>> void operator=(const std::pair<T1,T2>& p)
>> { m_x = p.first; m_y = p.second; }
>> mutable X& m_x;
>> mutable Y& m_y;
>> };

It's illegal, which saves having to dream up an interpretation for it
:->
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  Curbralan Ltd mobile: +44 7801 073 508
  kevlin_at_[hidden] fax: +44 870 052 2289
____________________________________________________________


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk