This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::stoi and std::to_string on MinGW


2014-12-20 3:28 GMT+01:00 Jonathan Wakely <jwakely.gcc@gmail.com>:
> People keep hitting the problem that std::stoi and std::to_string are
> not defined when using MinGW, because of the fix for
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
>
> If the problem is only with vswprintf then couldn't we enable
> everything except std::to_wstring?
>
> That would solve the problem for most people, as std::to_string and
> all the std::sto* functions would be defined, we'd only be missing
> std::to_wstring which I never see anyone trying to use anyway.

So patch is ok.  AFAICS it affects just MinGW.org based build of libstdc++, as

_GLIBCXX_HAVE_BROKEN_VSWPRINTF is just defined in this case.  For
mingw targets using mingw-w64 based build this change has no affect
due it provides none-broken w-scanf/printf C99 API,

Patch is ok.

Thanks,
Kai

PS: By mingw-w64 users the wide-character API is actually used.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]