[boost.stringalgo] issue
Hi list:
I am in the process of using boost::algorithm::replace_all with the
following tuple:
Boost::tuple , FindResultT=boost::iterator_range , IteratorT=std::_String_const_iterator ]
d:\work\access for
everyone\ghg\tpproductssr\tpproductssr.cpp(41) : see reference to
function template instantiation 'void
boost::algorithm::replace_all,std::basic_string<_Elem,_Traits,_Ax>,const
wchar_t[11]>(SequenceT &,const Range1T &,Range2T (&))' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_Ax=std::allocator,
SequenceT=const
std::basic_string
Sean Farrow skrev:
Hi list: I am in the process of using boost::algorithm::replace_all with the following tuple: Boost::tuple
If I use the code below: std::wstring temp1, temp2, temp3; temp1 =ProcInfo.get<1>().string(); temp2 =ProcInfo.get<1>().filename(); temp3 =L"dolapi.dll"; boost::algorithm::replace_all(temp1, temp2, temp3); The code compiles fine, How ever if I use: boost::algorithm::replace_all(ProcInfo.get<1>().string(), ProcInfo.get<1>().filename(), L"dolapi.dll");
is .string() returning a mutable reference? -Thorsten
Hi: What is the best way of checking this. Chers Sean. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Thorsten Ottosen Sent: 11 May 2009 18:47 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [boost.stringalgo] issue Sean Farrow skrev:
Hi list: I am in the process of using boost::algorithm::replace_all with the following tuple: Boost::tuple
If I use the code below: std::wstring temp1, temp2, temp3; temp1 =ProcInfo.get<1>().string(); temp2 =ProcInfo.get<1>().filename(); temp3 =L"dolapi.dll"; boost::algorithm::replace_all(temp1, temp2, temp3); The code compiles fine, How ever if I use: boost::algorithm::replace_all(ProcInfo.get<1>().string(), ProcInfo.get<1>().filename(), L"dolapi.dll");
is .string() returning a mutable reference? -Thorsten _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users __________ Information from ESET NOD32 Antivirus, version of virus signature database 4068 (20090512) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4068 (20090512) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
Hi: It doesn't appear to, the filename declaration is: String_type Filename() const Any suggestions. Chers Sean. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Thorsten Ottosen Sent: 12 May 2009 20:02 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [boost.stringalgo] issue Sean Farrow skrev:
Hi: What is the best way of checking this. Chers look in the docs for filesystem.
-Thorsten _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users __________ Information from ESET NOD32 Antivirus, version of virus signature database 4068 (20090512) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4068 (20090512) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
Hi: True, good point. I'll leave the code as is then. Sean. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Thorsten Ottosen Sent: 12 May 2009 21:57 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [boost.stringalgo] issue Sean Farrow skrev:
Hi: It doesn't appear to, the filename declaration is: String_type Filename() const
How the h*** do you expect to erase from an rvalue? :-) (we need move semantics to do that. You have to cache the container/string you are erasing values in. -Thorsten _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users __________ Information from ESET NOD32 Antivirus, version of virus signature database 4068 (20090512) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4068 (20090512) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
participants (2)
-
Sean Farrow
-
Thorsten Ottosen