Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Document policy on backporting features to older C++ dialects #72

Closed
jrhemstad opened this issue Nov 13, 2020 · 0 comments · Fixed by #107
Closed

Document policy on backporting features to older C++ dialects #72

jrhemstad opened this issue Nov 13, 2020 · 0 comments · Fixed by #107

Comments

@jrhemstad
Copy link
Collaborator

jrhemstad commented Nov 13, 2020

libcu++ makes some library features of the STL available in older C++ dialects, e.g., type_traits and chrono.

We should document our policy for what features libcu++ will backport.

From @brycelelbach:

I think that policy should be whenever it is possible to implement a
library feature from a newer dialect in an older dialect, we will do so. If
the library feature depends on newer language features, then we shouldn't
backport it. If it uses newer language features, but they aren't core to the
facility or change, then we should make a best effort. For example, C++17
string_view has deduction guides, which are a C++17 language feature, but they
are not central to the design of string_view.

There is some concern that this could decrease portability where a user of libcu++ uses backported feature X and then switches to another standard library where feature X is not available in the same C++ dialect.

We could:

  • Do nothing and just backport features.
  • Make it opt-in.
  • Make it opt-out.
  • Provide an opt-in warning mode.
  • Provide an opt-out warning mode.
  • Only do it in cuda::std but not in std.
@jrhemstad jrhemstad changed the title Document policy on backporting C++ features Document policy on backporting features to older C++ dialects Nov 13, 2020
@jrhemstad jrhemstad added this to CCCL Aug 11, 2022
@github-project-automation github-project-automation bot moved this to Done in CCCL Feb 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant