From: Uladzislau Rezki <urezki@gmail.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: gdb@sourceware.org
Subject: Re: why so
Date: Mon, 09 Mar 2009 09:24:00 -0000 [thread overview]
Message-ID: <e4957ae10903090224l5793cf4drbc8be3ff4803ff0e@mail.gmail.com> (raw)
In-Reply-To: <8ac60eac0903081021j6eef006ckcb2458d27ed60c02@mail.gmail.com>
On Sun, Mar 8, 2009 at 7:21 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> On Sun, Mar 8, 2009 at 6:12 AM, Uladzislau Rezki <urezki@gmail.com> wrote:
>
>> I am stuck with debugging C++ application that uses STL.
>> So, i have a simple code:
>>
>> #include <iostream>
>>
>> static int
>> test(std::string s)
>
> Note that passing strings by value is very inefficient.
> You should probably pass 'const string &' instead, and this will
> also cure the glitch you are observing.
>
If i pass "std::string &s', everything will work in my case and i see normal
string, this issue happens just in case 'std::string s'.
Thanks for your answer.
--
Uladzislau Rezki
prev parent reply other threads:[~2009-03-09 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 13:12 Uladzislau Rezki
2009-03-08 17:21 ` Paul Pluzhnikov
2009-03-09 9:24 ` Uladzislau Rezki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4957ae10903090224l5793cf4drbc8be3ff4803ff0e@mail.gmail.com \
--to=urezki@gmail.com \
--cc=gdb@sourceware.org \
--cc=ppluzhnikov@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox