On Thursday, May 3, 2012 11:29:53 AM UTC-5, SG wrote:
>
> Perhaps in all other places you only use the moving push_back
> function. Without std::move in this place your executable would
> contain both versions of push_back. With std::move in this place your
> executable would only contains the moving push_back (because the other
> one is never used) and be therefore 492 bytes smaller. It's hard to
> tell without knowing all the other code.
>
The code can be downloaded here --
http://webEbenezer.net/misc/direct.tar.bz2 .
The program is my middle tier which I call the cmwAmbassador.
Your theory is interesting, but I'm not sure if it is right.
cmwa_config_data.cc: accounts.push_back(accountInfo);
cmwa_config_data.cc: accounts.push_back(accountInfo);
cmwAmbassador.cc: pendingTransactions.push_back(::std::move(request) );
cmw_user_input.cc: headers.push_back( File(static_cast<char const*>(strtok(nullptr, "\n "))) );
MarshallingFunctions.hh: intrlst.push_back(*T::value_type::BuildPolyInstanc e(buf));
remote_messages_middle.cg.hh: az1.push_back(rep2);
Here are the uses of push_back. I don't think the one in MarshallingFunctions.hh is a factor as it is in a template which isn't instantiated for this program. The last one is the one in the original post.
All but the one in the MarshallingFunctions are used in the program.
Thanks for the idea. I'm still wondering about this.