[Boost-bugs] [Boost C++ Libraries] #5714: replace_all does not allow to replace single chars

Subject: [Boost-bugs] [Boost C++ Libraries] #5714: replace_all does not allow to replace single chars
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-19 07:33:49


#5714: replace_all does not allow to replace single chars
------------------------------+---------------------------------------------
 Reporter: anonymous | Owner: pavol_droba
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: string_algo
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 Following code does not compile:
 {{{
 #include <string>
 #include <boost/algorithm/string.hpp>

 using namespace std;
 using namespace boost;
 using namespace boost::algorithm;

 int main()
 {
     string str = "abc";
     replace_all(str, 'a', 'A');
 }
 }}}
 {{{
 /usr/include/boost/algorithm/string/replace.hpp: In function 'void
 boost::algori
 thm::replace_all(SequenceT&, const Range1T&, const Range2T&) [with
 SequenceT = s
 td::string, Range1T = char, Range2T = char]':
 x.cc:11: instantiated from here
 /usr/include/boost/algorithm/string/replace.hpp:654: error: no matching
 function
  for call to 'first_finder(const char&)'
 /usr/include/boost/algorithm/string/replace.hpp:654: error: no matching
 function
  for call to 'const_formatter(const char&)'
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5714>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC