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");
Compiling...
TPProductsSR.cpp
c:\program
files\boost\boost\algorithm\string\detail\find_format_all.hpp(250) :
error C2664: 'boost::algorithm::detail::erase' : cannot convert
parameter 2 from 'input_iterator_type' to
'std::_String_iterator<_Elem,_Traits,_Alloc>'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_Alloc=std::allocator
]
No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
c:\program
files\boost\boost\algorithm\string\detail\find_format_all.hpp(185) : see
reference to function template instantiation 'void
boost::algorithm::detail::find_format_all_impl2(InputT
&,FinderT,FormatterT,FindResultT,FormatResultT)' being compiled
with
[
InputT=const
std::basic_string,
FinderT=boost::algorithm::detail::first_finderF,boost::algorithm::is_equal>
,
FormatterT=boost::algorithm::detail::const_formatF
,
FindResultT=boost::iterator_range>,
IteratorT=const wchar_t *,
FormatResultT=boost::iterator_range
]
c:\program
files\boost\boost\algorithm\string\find_format.hpp(254) : see reference
to function template instantiation 'void
boost::algorithm::detail::find_format_all_impl(InputT &,FinderT,FormatterT,FindResultT)'
being compiled
with
[
SequenceT=const
std::basic_string,
FinderT=boost::algorithm::detail::first_finderF,boost::algorithm::is_equal>
,
FormatterT=boost::algorithm::detail::const_formatF
,
IteratorT=std::_String_const_iterator,
InputT=const
std::basic_string,
FindResultT=boost::iterator_range>
]
c:\program files\boost\boost\algorithm\string\replace.hpp(657) :
see reference to function template instantiation 'void
boost::algorithm::find_format_all(SequenceT
&,FinderT,FormatterT)' being compiled
with
[
SequenceT=const
std::basic_string,
SearchIteratorT=std::_String_const_iterator,
PredicateT=boost::algorithm::is_equal,
RangeT=boost::iterator_range,
FinderT=boost::algorithm::detail::first_finderF,boost::algorithm::is_equal>
,
FormatterT=boost::algorithm::detail::const_formatF
]
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,
Range1T=std::basic_string,
Range2T=const wchar_t [11]
]
c:\program
files\boost\boost\algorithm\string\detail\find_format_all.hpp(255) :
error C2664: 'boost::algorithm::detail::insert' : cannot convert
parameter 2 from 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' to
'std::_String_iterator<_Elem,_Traits,_Alloc>'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_Alloc=std::allocator
]
No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
Using visual c++ 2008 on a windows xp box, not that this (the o/s at
least) matters.
How can I avoid creating temporary variables in this case?
Any help appreciated.
Sean.
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4061 (20090507) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com