$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Heads up - string_ref landing
From: Maxim Yanchenko (maximyanchenko_at_[hidden])
Date: 2012-11-16 10:00:54
Olaf van der Spek <ml <at> vdspek.org> writes:
>
> On Fri, Nov 16, 2012 at 3:25 PM, Mathias Gaunard
> <mathias.gaunard <at> ens-lyon.org> wrote:
> > void f(std::string const&);
> > f("Olaf");
>
> Are compilers/optimizers not smart enough to construct the temporary
> object at compile time?
I'm afraid they are not smart enough to eliminate an unneeded temporary when
it's something sophisticated like std::string...
Maxim