Skip to content
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

P1642R11 Freestanding Library: Easy [utilities], [ranges], And [iterators] #2914

Closed
StephanTLavavej opened this issue Jul 25, 2022 · 4 comments
Labels
cxx23 C++23 feature resolved Successfully resolved without a commit

Comments

@StephanTLavavej
Copy link
Member

StephanTLavavej commented Jul 25, 2022

P1642R11 Freestanding Library: Easy [utilities], [ranges], And [iterators]
LWG-3814 Add freestanding items requested by NB comments

For our hosted implementation, there is likely nothing to do here.

This paper intentionally doesn't change any feature-test macros.

@StephanTLavavej StephanTLavavej added the cxx23 C++23 feature label Jul 25, 2022
@frederick-vs-ja
Copy link
Contributor

Components provided in MSVC STL's core headers are almost the subset of freestanding components (plus C23 freestanding components and P2338). The major exceptions are that many non-freestanding C library components, e.g. <clocale>, are STL-core components.

Some freestanding components are not STL-core:

  • Heap-related components, i.e. operator new and operator delete in <new> and helper types.
    • Placement operator new and operator delete seem to be core components and used by default_initializable, etc..
  • Exception-related components in <exception>, etc..
  • RTTI-related components in <typeinfo>.
  • Range-related components in <iterator>, <ranges>, and <memory>.
    • For "concrete" iterators and ranges (including input of algorithms), STL verifies the range during debug whenever possible, and the utilities used for verification are non-core.
    • For "abstract" range components (concepts, iterator_traits, etc.), it seems that they are suitable to be core, and I made some of them core in <tuple>: Becomes a core header #2730.
  • Other missing pieces, e.g. mem_fn.

In conclusion, I think it would be an improvement to make abstract range utilities and "other missing pieces" core components. The downside is that

  • either we will have to expose more non-standard core headers, or
  • we will have to move more components to existing core headers, which will damage throughput when including these headers only.

@StephanTLavavej StephanTLavavej added the decision needed We need to choose something before working on this label Jan 27, 2023
@StephanTLavavej
Copy link
Member Author

I tend to think that our notion of "core" is too different from "freestanding" to tie these things together. (Also what we consider "core" isn't exactly crisply defined.) Marking as decision needed.

@StephanTLavavej StephanTLavavej added resolved Successfully resolved without a commit and removed decision needed We need to choose something before working on this labels Feb 1, 2023
@StephanTLavavej
Copy link
Member Author

We talked about this at the weekly maintainer meeting and decided to resolve this as "nothing to do for our hosted implementation". As I mentioned, we'll continue to explore exactly what being a "core" header involves, but this should not be connected to the Standard's definition of freestanding machinery.

@frederick-vs-ja
Copy link
Contributor

May be related to #1289.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx23 C++23 feature resolved Successfully resolved without a commit
Projects
Development

No branches or pull requests

2 participants