Boost logo

Boost :

From: Amr Shahin (amrnablus_at_[hidden])
Date: 2007-12-17 10:23:46


hello
im trying to use the replace_all function defined in
boost/algorithm/string.hpp header, but when i try to compile it under
solaris, i get following error:

"/usr/include/boost/algorithm/string/detail/sequence.hpp", line 34: Error:
Could not find a match for std::string::insert(char*,
std::deque<char>::iterator, std::deque<char>::iterator) needed in
boost::algorithm::detail::insert<std::string,
std::deque<char>::iterator>(std::string &, char*,
std::deque<char>::iterator, std::deque<char>::iterator)

this is the source code:

#include<cstring>
#include<iostream>
#include <boost/algorithm/string.hpp>

using namespace std;
using namespace boost;

int main( )
{
        string s = "Amr Yassir Shahin";
        replace_all( s , "Yassir" , "Adel" );
        cout << "s now: " << s << endl;
        return 0;
}

and this is the command i use to compile

g++ file.cpp

my machine is : SunOS suntest 5.9 Generic_118558-26 sun4u sparc
SUNW,Sun-Fire-V240

anyone can help ?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk