From -6579992481908007540
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,cc1a555bbe9617a3
X-Google-Attributes: gidf78e5,public
From: Valentin Bonnard <bonnardv@pratique.fr>
Subject: Re: STL and SGI and strings
Date: 1998/01/13
Message-ID: <34BB973F.167EB0E7@pratique.fr>#1/1
X-Deja-AN: 315647365
References: <34B57837.41C6@pixar.com> <34B6580F.6A50@pratique.fr> <m3oh1jezw9.fsf@gabi-soft.fr> <34BAA6FB.17121A3E@acm.org>
X-Original-Date: Tue, 13 Jan 1998 17:33:04 +0100
Originator: austern@isolde.mti.sgi.com
Organization: Ecole Normale Superieure, Paris, France
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBNLvXtEy4NqrwXLNJAQGxNgH/VOf89CaNEiawi+XphAMDpNHiKSZCWazM 51BFX9KQ4y9ZlwIe+RkLZdB6pZsOQa21tLX2oC39sYt9/EbGVMvwvQ== =/PRT
Newsgroups: comp.std.c++


Pete Becker wrote:
> 
> J. Kanze wrote:
> >
> >
> > In my own code, I don't think I've
> > ever used an op[], either in my own string class or someone elses.  I'll
> > admit that I cheat, however -- when parsing, I normally do the
> > equivalent of c_str(), and use the resulting pointer:-).

Which still disallow sharing, except if c_str copies the data, which 
is as inneficient.

> That's not cheating. I was against having operator[] in the string class
> at all, but the forces of inertia were impossible to overcome.

Can you explain that to me (or us), or give a document number ?

In particular, how does one reaad the char at position i ?
Change it ? Would it be compatible with the RandomAccessContainner 
requirements ?

-- 

Valentin Bonnard                mailto:bonnardv@pratique.fr
info about C++/a propos du C++: http://www.pratique.fr/~bonnardv/
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



