Gcc-4.8 doesn't have std::codecvt.

Use boost::locale::conv::utf_to_utf instead.
pull/309/head
John Ralls 8 years ago
parent 10b7cbc257
commit 867fdce4e4

@ -37,6 +37,7 @@ extern "C"
#include <stdint.h> #include <stdint.h>
#include <boost/regex.hpp> #include <boost/regex.hpp>
#include <boost/locale/encoding_utf.hpp>
#include <sstream> #include <sstream>
#include <cstdlib> #include <cstdlib>
@ -1307,11 +1308,11 @@ main(int argc, char ** argv)
std::ostream& std::ostream&
operator<<(std::ostream& s, GncNumeric n) operator<<(std::ostream& s, GncNumeric n)
{ {
using boost::locale::conv::utf_to_utf;
std::basic_ostringstream<wchar_t> ss; std::basic_ostringstream<wchar_t> ss;
ss.imbue(s.getloc()); ss.imbue(s.getloc());
ss << n; ss << n;
std::wstring_convert<std::codecvt_utf8<wchar_t>> make_utf8; s << utf_to_utf<char>(ss.str());
s << make_utf8.to_bytes(ss.str());
return s; return s;
} }

@ -27,7 +27,6 @@
#include <iostream> #include <iostream>
#include <locale> #include <locale>
#include <typeinfo> // For std::bad_cast exception #include <typeinfo> // For std::bad_cast exception
#include <codecvt> // UTF-8 <--> UTF16 conversion
#include "gnc-rational-rounding.hpp" #include "gnc-rational-rounding.hpp"
class GncRational; class GncRational;

Loading…
Cancel
Save