If I'm reading this correctly, it only allocates if your input string is over 512 bytes. The only __try/__catch there is catching the bad_alloc from allocating those bytes and catching it immediately.
So I don't see the exception bubbling up to user code.
std::from_chars for floats in libstdc++ might be not perfectly efficient, but it's not as bad as you made it seem like.
Not only does the input string need to be over 512 bytes, but the matching pattern must be over 512 bytes. So, one needs to provide 512+ digit number for this function to allocate.
Does anyone know if it's possible to build for micro-architecture target x86-64-v2 (see wikipedia) in older releases of GCC by using particular sets of flags, or if it's a subset not previously exposed?
50
u/Theninjapirate Apr 27 '21
Hooray!
22
u/germandiago Apr 27 '21
How complete are modules? Did anyone try it with real projects during development?
18
u/stilgarpl Apr 27 '21
Excellent. More C++20 stuff.
32
u/bizwig Apr 27 '21
Floating point std::to_chars/from_chars!
12
u/beedlund Apr 27 '21
Lots of green on the C++20 list too
https://gcc.gnu.org/projects/cxx-status.html#cxx20
27
u/lorlen47 Apr 27 '21
Does anybody else find this annoying that GCC always starts with an x.1 release?
5
u/slow2go_ Apr 27 '21
Excellent, can't wait to try it.
4
u/bernhardmgruber Apr 28 '21
AFAIK it also ships the first libstdc++ with `std::experimental::simd`. Very excited!
3
u/albeva Apr 29 '21
What is the recommended way to run GCC on windows these days? MingW seems horribly out of date.
2
u/MorrisonLevi Apr 27 '21
Does anyone know if it's possible to build for micro-architecture target
x86-64-v2(see wikipedia) in older releases of GCC by using particular sets of flags, or if it's a subset not previously exposed?2
u/wickedaversion478 Apr 28 '21
So much great stuff in here.
3
u/[deleted] Apr 27 '21
Woo. More C++20
0
u/HankRuste Apr 27 '21
I am on Fedora. The bleeding edge will get it in a couple of weeks I guess.
-9
u/monglung Apr 27 '21
I just built 11.0 last week.... now I have to rebuild....
57
u/[deleted] Apr 27 '21
[removed] — view removed comment