Web lists-archives.com

Re: [Mingw-users] 'to_string' is not a member of 'std'

-----Original Message-----
From: Keith Marshall [mailto:keithmarshall@xxxxxxxxxxxxxxxxxxxxx] 
Sent: Monday, May 08, 2017 5:13 PM
To: mingw-users@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Mingw-users] 'to_string' is not a member of 'std'

Hash: SHA1

On May 5, 2017, Keith Marshall wrote:

>On 08/05/17 18:23, Eli Zaretskii wrote:
>> I hit this problem today while building a pretest of GDB 8.0 with 
>> MinGW.  The compilation errors out like this:
>>   cli/cli-script.c: In member function 'std::__cxx11::string user_args::insert_args(const char*) const':
>>   cli/cli-script.c:809:16: error: 'to_string' is not a member of 'std'
>> 	new_line += std::to_string (m_args.size ());

... snip ...

>What version of mingwrt are you using now?  This WJFFM:

 > $ cat foo.cpp
>#include <string>
> int main() { std::to_string(10); }

 ... snip ...
  $ mingw32-g++ -c -std=c++11 -fsyntax-only foo.cpp
  <no diagnostic output here>

...snip ...

>> If the runtime issue is not yet fixed, what would it take to fix it?

>Looks to me as if it should work just fine already.

I see much the same thing with my native build of gcc 6.3.0.

I must use -std=gnu++98 to see the error message.

(gcc 6 defaults to gnu++14)

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe