Skip to content

P0067R5: Elementary string conversions #99940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cjdb opened this issue Jul 22, 2024 · 8 comments
Open

P0067R5: Elementary string conversions #99940

cjdb opened this issue Jul 22, 2024 · 8 comments
Labels
c++17 libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. wg21 paper Issues representing the implementation of a WG21 paper

Comments

@cjdb
Copy link
Contributor

cjdb commented Jul 22, 2024

Link: https://wg21.link/p0067r5

BEGIN-RST-NOTES
For integer types, ``std::(to|from)_chars`` has been available since v7; for ``float`` and ``double``, ``std::to_chars`` since v14 and ``std::from_chars`` since v20. Support is complete except for ``long double``.
END-RST-NOTES
@cjdb cjdb added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. c++17 labels Jul 22, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 22, 2024

@llvm/issue-subscribers-c-17

Author: Christopher Di Bella (cjdb)

@cjdb cjdb changed the title Implement 'P0067R5 Elementary string conversions' Complete 'P0067R5 Elementary string conversions' Jul 22, 2024
@h-vetinari
Copy link
Contributor

I'm glad there are finally issues for these topics; that makes it much easier to collect publicly available information about them, rather have them scattered in the heads of core libcxx contributors.

Also some context I had kept from long ago

@h-vetinari: Stumbled over this while looking for the status of P0067R5; took me a while to unearth some old comments on this topic in https://reviews.llvm.org/D70631:

@h-vetinari: I was under the impression that 87c0160 did most of the work for from_chars?

@mordante: Thanks for both links I wasn't aware of this effort!
At the moment I'm too busy with <format> to look at from_chars, but this is useful when somebody starts working on from_chars. (I might look at it when I finished the larger projects I'm working on.)

@ldionne ldionne added the wg21 paper Issues representing the implementation of a WG21 paper label Jul 30, 2024
@ldionne ldionne changed the title Complete 'P0067R5 Elementary string conversions' P0067R5: Elementary string conversions Aug 1, 2024
@ldionne ldionne moved this from Todo to Partial in libc++ Standards Conformance Aug 21, 2024
@lemire
Copy link

lemire commented Sep 11, 2024

The from_chars issue could be largely solved with https://github.com/fastfloat/fast_float

It is what GCC/glibc++ does.

I also left a comment in #92711

I'd be happy to help.

@h-vetinari
Copy link
Contributor

The implementation of the remaining bits landed in #91651, which completes this paper except for long-double support (needs #113237). Feature test macro wasn't set yet.

@frederick-vs-ja
Copy link
Contributor

Looks like that we're now very close to setting FTM on long double-eq-double platforms.

@cor3ntin
Copy link
Contributor

@frederick-vs-ja I'm trying to figure out what the status of that is since you closed your pr. Is it actually complete ? Thanks!

@philnik777
Copy link
Contributor

@cor3ntin No, it's not complete. There is no fundamental hurdle to adding the long double versions (except on some funky IBM system), but someone has to write the tests for it.

@mordante
Copy link
Member

mordante commented Apr 1, 2025

but someone has to write the tests for it.

There is some implementation work to do too, especially for to_chars. Just to add a bit more information, adding the tests is no small effort. (I expect it to take over a week of work.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++17 libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. wg21 paper Issues representing the implementation of a WG21 paper
Projects
Status: Partial
Development

No branches or pull requests

9 participants