From 8578607109148790387
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,cc1a555bbe9617a3
X-Google-Attributes: gidf78e5,public
From: "Brock" <peabody@npcinternational.com>
Subject: Re: STL and SGI and strings
Date: 1998/01/13
Message-ID: <69e5d5$eki$1@news2.ispnews.com>#1/1
X-Deja-AN: 315554479
References: <34B57837.41C6@pixar.com> <34B6580F.6A50@pratique.fr>
X-Original-Date: Mon, 12 Jan 1998 16:40:20 -0600
X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3
Organization: ISPNews http://ispnews.com
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANLuFE+EDnX0m9pzZAQHSFQF/Sc5rAsDJXf3C418Dp/k8WQGsGnSqOVMQ P7pTnwq98vbv5Pa3WJq1fVxtEKfvv9Bj =l61U
Newsgroups: comp.std.c++


Valentin Bonnard wrote in message <34B6580F.6A50@pratique.fr>...
<<<

>The problem is that sharing is often impossible as:
>- operator[] has to return a charT&


Does it have to return a charT& according to the standard?  I read somewhere
(More Effective C++?) about an efficient way to determine whether operator[]
was used for read or write access by returning an object with an overloaded
operator=(charT), and an operator charT().  I even wrote a (hopeless) email
to my vendor (MS) complaining that their std::string implementation didn't
use this technique, as I had assumed it to be the standard way to do it.

<<<
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]



