|
Boost Users : |
From: Chris Hoeppler (hoeppler_at_[hidden])
Date: 2006-05-30 10:07:03
Hi,
the following snippet used to compile with the last released versions of
boost:
#include <boost/algorithm/string/replace.hpp>
#include <string>
int main() {
char* esc = "\t";
char* sub = "\\t";
std::string str("\tbla\t");
boost::algorithm::replace_all(str, esc, sub);
return 0;
}
Trying the current anonymous cvs version, it fails to compile on linux with
gcc version 3.3.3. Is this to be expected?
Chris
Error messages:
gcc.compile.c++ bin/gcc/debug/replace_all.o
../../boost-built/boost/range/const_iterator.hpp: In instantiation of
`boost::range_const_iterator<char*>':
../../boost-built/boost/algorithm/string/replace.hpp:653: instantiated from
`void boost::algorithm::replace_all(SequenceT&, const Range1T&, const
Range2T&) [with SequenceT = std::string, Range1T = char*, Range2T = char*]'
replace_all.cpp:17: instantiated from here
../../boost-built/boost/range/const_iterator.hpp:37: error: `char*' is not a
class, struct, or union type
../../boost-built/boost/algorithm/string/replace.hpp: In function `void
boost::algorithm::replace_all(SequenceT&, const Range1T&, const Range2T&)
[with SequenceT = std::string, Range1T = char*, Range2T = char*]':
replace_all.cpp:17: instantiated from here
../../boost-built/boost/algorithm/string/replace.hpp:653: error: no matching
function for call to `first_finder(char* const&)'
../../boost-built/boost/algorithm/string/detail/formatter.hpp: At global
scope:
../../boost-built/boost/algorithm/string/detail/formatter.hpp: In
instantiation of `boost::algorithm::detail::const_formatF<char*>':
../../boost-built/boost/algorithm/string/formatter.hpp:46: instantiated from
`boost::algorithm::detail::const_formatF<RangeT>
boost::algorithm::const_formatter(const RangeT&) [with RangeT = char*]'
../../boost-built/boost/algorithm/string/replace.hpp:653: instantiated from
`void boost::algorithm::replace_all(SequenceT&, const Range1T&, const
Range2T&) [with SequenceT = std::string, Range1T = char*, Range2T = char*]'
replace_all.cpp:17: instantiated from here
../../boost-built/boost/algorithm/string/detail/formatter.hpp:35: error: no
type named `type' in `struct boost::range_const_iterator<char*>'
../../boost-built/boost/algorithm/string/detail/formatter.hpp:36: error: no
type named `type' in `struct boost::range_const_iterator<char*>'
../../boost-built/boost/algorithm/string/detail/formatter.hpp:54: error: no
type named `type' in `struct boost::range_const_iterator<char*>'
../../boost-built/boost/algorithm/string/detail/formatter.hpp:54: confused by
earlier errors, bailing out
"g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC
-DBOOST_ALL_NO_LIB=1 -I"." -I"../../boost-built" -c -o
"bin/gcc/debug/replace_all.o" "replace_all.cpp"
...failed gcc.compile.c++ bin/gcc/debug/replace_all.o...
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net