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

[FEA]: Settle on a proper policy for non standard extensions #453

Open
1 task done
miscco opened this issue Sep 18, 2023 · 1 comment
Open
1 task done

[FEA]: Settle on a proper policy for non standard extensions #453

miscco opened this issue Sep 18, 2023 · 1 comment
Labels
feature request New feature or request.

Comments

@miscco
Copy link
Collaborator

miscco commented Sep 18, 2023

Is this a duplicate?

Area

libcu++

Is your feature request related to a problem? Please describe.

Currently we are inconsistent whether we follow the standards constraints on whether a feature is available and whether it is constexpr or not.

Mostly we are on par with the standard except when we are not. This usually happens when we backport a feature (e.g std::optional) to an earlier standard mode. Usually we document those instances, but usually only for the "big" feature and not for all the necessary machinery.

Same goes for constexpr we need some functionality here and there and we usually just change it whenever needed.

I believe we should settle on a few global policies.

  1. When will something be available.

Currently only some features are backported. So we be consistent and e.g say "We backport everything to C++14" as a baseline?

  1. When will something be constexpr

Currently this is purely random. Should we define a consistent policy like. "Everything is constexpr at C++14" *if the language permits

Describe the solution you'd like

Make everything available at C++14 (exceptions exist such as ranges, where the implementation cost is too great)

Make everything constexpr at C++14. C++11 only allows single line functions, but C++14 more or less gives us all the tools we need.

Describe alternatives you've considered

We are docuumenting our standard extensions. Technically we would have to mention each backport and each constexpr extension by hand

Additional context

No response

@miscco miscco added the feature request New feature or request. label Sep 18, 2023
@miscco miscco changed the title [FEA]: Settle on a proper design for constexpr extensions [FEA]: Settle on a proper design for non standard extensions Sep 18, 2023
@miscco miscco changed the title [FEA]: Settle on a proper design for non standard extensions [FEA]: Settle on a proper policy for non standard extensions Sep 18, 2023
@jrhemstad
Copy link
Collaborator

I believe I wrote such a policy here: https://github.com/jrhemstad/libcudacxx/blob/e923a36d0cb35f3cbfc846c92a2b5037b018054b/docs/standard_api.md#standard-library-backports

I wouldn't want to be beholden to a blanket requirement of backporting everything to C++14 if the effort isn't worth it.

Furthermore, we'll be dropping C++11/14 from Thrust/CUB in the medium term future. We'll always support C++11/14 standard library features in libcu++, but I don't think it is worth the effort to maintain support for older dialects in extensions and backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request.
Projects
Status: Todo
Development

No branches or pull requests

2 participants