This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Make charconv require C++17 or later.
ClosedPublic

Authored by Mordante on Sep 2 2022, 9:51 AM.

Details

Reviewers
ldionne
philnik
Group Reviewers
Restricted Project
Restricted Project
Commits
rGe17ec8e9baa8: [libc++] Make charconv require C++17 or later.
Summary

Implementing the paper
P2291R3 Add Constexpr Modifiers to Functions to_chars and from_chars for

Integral Types in <charconv> Header

Gives issues in language versions prior to C++17. As suggested in
D131855 disable the code prior to C++17. This removes libc++'s
extension.

Diff Detail

Event Timeline

Mordante created this revision.Sep 2 2022, 9:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2022, 9:51 AM
Mordante updated this revision to Diff 457777.Sep 3 2022, 1:27 AM

Rebased and changed XFAIL to UNSUPPORTED as it should be.

Mordante edited the summary of this revision. (Show Details)Sep 3 2022, 1:28 AM

We would need to add a release note.

ldionne added a comment.EditedSep 6 2022, 12:49 PM

Note to self: 100513369

I do not foresee this being a big issue. I didn't find any instances of code breaking internally, which should give a rough idea that this is not a super commonly relied on extension.

Mordante updated this revision to Diff 465078.Oct 4 2022, 10:52 AM

Rebased and updates release notes.

Mordante published this revision for review.Oct 4 2022, 10:53 AM
Mordante edited the summary of this revision. (Show Details)
Mordante added a reviewer: Restricted Project.
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 10:53 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante retitled this revision from [RFC][libc++] Make charconv require C++17 or later. to [libc++] Make charconv require C++17 or later..Oct 4 2022, 10:57 AM
philnik accepted this revision as: philnik.Oct 4 2022, 11:17 AM
philnik added a subscriber: philnik.

I think it's a good idea, but this is ultimately a vendor question, so I'll leave final approval to Louis.

ldionne accepted this revision.Oct 5 2022, 8:57 AM

I think it's a good idea, but this is ultimately a vendor question, so I'll leave final approval to Louis.

I did an internal survey and couldn't find any uses of the extension. It doesn't mean that it'll break zero code, but I don't think it's going to be a big deal (for instance the removal of binary_function and unary_function was much more disruptive but we still did it).

libcxx/docs/ReleaseNotes.rst
84–85
This revision is now accepted and ready to land.Oct 5 2022, 8:57 AM
Mordante marked an inline comment as done.Oct 8 2022, 4:50 AM
This revision was automatically updated to reflect the committed changes.