Shaul Karl <[EMAIL PROTECTED]> writes:
> Attached a short program and a longer compilation output.
> If I understand it correctly then the type
>
> map<string, string&>
>
> is not acceptable.
>
> But why? The compilation output mentions `reference to reference'. Can
> you elaborate on this or do these 3 words say it all? Is this up to me
> or is it something that is done internally by the STL?
> In particular, in what circumstances will references to other classes
> instead of string& be accepted?
My *guess* is that you should not use references for map::mapped_type.
STL probably uses references to map::mapped_type, e.g. defining
mapped_type& map::operator[](const key_type&)
so it tries to form a reference to reference at construct time.
Disclaimer: this might be wrong. ;-)
--
Oleg Goldshmidt | [EMAIL PROTECTED]
[Lisp] is the only computer language that is beautiful.
- Neal Stephenson
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]