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

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

Loading…
Cancel
Save