This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Deprecate the classes in strstream.
ClosedPublic

Authored by Mordante on May 25 2023, 11:05 AM.

Details

Reviewers
ldionne
philnik
Group Reviewers
Restricted Project
Commits
rG66c7388c83bb: [libc++] Deprecate the classes in strstream.
Summary

These have been deprecated since their initial version in libc++. It
seems they were never properly marked as deprecated.

Discovered while working on D151223.

Diff Detail

Event Timeline

Mordante created this revision.May 25 2023, 11:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 11:05 AM
Mordante requested review of this revision.May 25 2023, 11:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 11:05 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik added inline comments.
libcxx/include/strstream
144

At least according to cppreference, these have been deprecated since C++98, so we should just use _LIBCPP_DEPRECATED.

Mordante marked an inline comment as done.May 25 2023, 12:21 PM
Mordante added inline comments.
libcxx/include/strstream
144

Hmm indeed. I noticed in the draft repo they were deprecated in C++11. I never bothered to look before that time.
TIL things were standardized as deprecated :-/

Mordante updated this revision to Diff 525747.May 25 2023, 12:22 PM
Mordante marked an inline comment as done.

Addresses review comments.

Mordante updated this revision to Diff 526070.May 26 2023, 8:12 AM
  • Rebased to fix CI
  • Fixes and modernizes some tests
ldionne accepted this revision.May 29 2023, 2:30 PM
ldionne added a subscriber: ldionne.

LGTM but can we get a release note?

This revision is now accepted and ready to land.May 29 2023, 2:30 PM
philnik accepted this revision.May 29 2023, 2:39 PM

+1 for a release note.

libcxx/include/strstream
144

That's the bad part about the "standardizing existing practice". It would also have been better to not standardize implicit return 0; in main, but that happened too.

Thanks for the reviews. I'll add release notes before committing.

libcxx/include/strstream
144

At least that part is backwards compatibility with C. It's mainly that I'm surprised that the first version of the ISO Standard already deprecates things.

This revision was automatically updated to reflect the committed changes.