and literals. I was looking for stod() for example in MinGW includes and have not found it under std::
Anyone have an exampled of how they are used?
and literals. I was looking for stod() for example in MinGW includes and have not found it under std::
Anyone have an exampled of how they are used?
Are you sure your version of g++ used by MinGW is C++11 compliant?
Here is a link to some documentation for these functions: std::stof.
Jim
Last edited by Imanuel; 12-15-2012 at 11:04 AM.
To my knowledge there is no compiler available for any platform that supports all features of C++11. However there might be a more recent version of g++ than the one you currently have. See this link: MinGW upgrade. And it also looks like the main minGW package has been upgraded to the 4.7 series so you may be able to get the package here also.Is there a full compatible compiler supporting all features of c++11 I can use with Eclipse?
Jim
I replied to this thread to laugh at you.Is there a full compatible compiler supporting all features of c++11 I can use with Eclipse?
GNU GCC has implemented the string conversions, according to this page (see the row starting with 21.5), but you would have to pull the code from the SVN and compile it. It's highly unlikely that it's in mingw right now but I could be wrong. If you *really need* these functions right now, try compiling with the bleeding edge in standards support.
If it doesn't work, you're stuck waiting for them to put it in later releases like the rest of us. But, as nice as these functions are, you shouldn't *really need* them.Code:mingw32-g++.exe -c test.cc -std=c++11 -o test
Last edited by whiteflags; 12-15-2012 at 09:30 PM.
The latest mingw uses gcc 4.7, which has better C++11 support than MSVC. But the library support relevant to this question should be available on any modern compiler.
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
The stoi() function will only be available starting with some of the latest versions of gcc. Version 4.5.2 did not support these functions, I don't remember if the 4.6 version supported them or not, but they are supported by the 4.7 versions.
Jim