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

Which version of C++ should we try to support for constexpr? #18

Open
wusatosi opened this issue Nov 16, 2024 · 6 comments
Open

Which version of C++ should we try to support for constexpr? #18

wusatosi opened this issue Nov 16, 2024 · 6 comments

Comments

@wusatosi
Copy link
Member

This will impact what kind of standard libraries we have access to.

@camio
Copy link
Member

camio commented Nov 16, 2024

It depends on how much of an implementation burden it would be to support older C++ standards. There's a case-by-case tradeoff between how many people can use this library and how much work it is to support older compilers.

@JeffGarland
Copy link
Member

It depends on how much of an implementation burden it would be to support older C++ standards.

With where Beman is w.r.t. things we're doing I think c++17 would is turning out to be the sort of minimum level we can support. We'll let Boost do the legacy support.

There's a case-by-case tradeoff between how many people can use this library

So if we're to support older stuff so more can use it that means use it except for the constexpr capability. Boost takes the approach of defining a macro so they can remove constexpr from signatures and tests on older compilers. It's no fun and the code is ugly. This is my point above, but I'd go further and say the default should be to not bother working around earlier version unless there's a request from someone. And my response if it were my code would be PR's accepted.

None of this should be interpreted as user hostile -- rather it's author friendly and saves time from implementing things no one actually wants.

@wusatosi
Copy link
Member Author

Current library version has a minimal version of C++ 20.

@wusatosi
Copy link
Member Author

I can lower major version for non-constexpr features to C++17.
I haven't tried applying constexpr yet.

@wusatosi
Copy link
Member Author

Looks like constexpr might need to stay at C++20.

Is there a constexpr costruct_at replacement for C++17? Looks like placement new operator is not constexpr.
This is one of the road block of constexpr-fying C++17...

@wusatosi
Copy link
Member Author

See #22 for c++ 17 non-constexpr support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants