can't use replace_all under solaris

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 ?
participants (1)
-
Amr Shahin