Closed apolukhin closed 8 months ago
The examples does not compile any more on C++20 and newer:
#include <boost/algorithm/string/find_iterator.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/lexical_cast.hpp>
#include <iostream>
int main() {
std::wstring wstr(L"10.10");
typedef boost::split_iterator<std::wstring::iterator> wsplit_iter_t;
auto wdot_iter =
boost::make_split_iterator(wstr, boost::first_finder(L"."));
std::cout << boost::lexical_cast<unsigned>(*wdot_iter++) << '.'
<< boost::lexical_cast<unsigned>(*wdot_iter++);
}
This is dues to https://wg21.link/p1423 that deleted the problematic operators in the C++ Standard Library
The following code will print "4948.4948" instead of expected "10.10" (This are ascii codes of the symbols instead of values):
Issue on trac: https://svn.boost.org/trac10/ticket/8261