From: Pavol Droba (droba_at_[hidden])
Date: 2006-03-29 13:47:49
On Wed, Mar 29, 2006 at 08:32:40PM +0200, Olaf van der Spek wrote:
> On 3/29/06, Pavol Droba <droba_at_[hidden]> wrote:
> > On Tue, Mar 28, 2006 at 12:55:19AM +0200, Olaf van der Spek wrote:
> > > On 3/27/06, Pavol Droba <droba_at_[hidden]> wrote:
> > > > > Or should all functions (in all applications and libraries) return
> > > > > const string instead of just string?
> > > >
> > > > Well no, you should make a copy and store it into a variable. There is copying there anyway
> > > > and if you don't mind returning std::string, you probably don't have problems with performance issues.
> > >
> > > But that doesn't look nice and introduces additional variables.
> > If I find some time, I will have a look. Maybe I'll come up with something.
> I'm actually wondering, is this really an issue of the current library?
> If so, why does VC8 not give an error/warning?
The reason is quite simple: because it is crapy compiler. If it would work
according to standard, it should report an error.
Still it might be possible, that there is some compatibility mode turned
on by default, that disables this error.
> Could this be a gcc issue instead?
No it is not a gcc issue. It was done intentionaly the way it is.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk