-
Notifications
You must be signed in to change notification settings - Fork 100
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
Make engine constexpr under c++14 and higher #75
Comments
@MBalszun a potentially useful hint, if you ever get around to working on such a PR: you can't make I know this because I'm using my own fork under C++20 and wanted constexpr functionality, but I did that without macros and tested only on GCC12 so it's not directly useful for what you're suggesting. |
@timoscs: Thanks for the hint. However, I got the impression, this repo is no longer maintained anyway and I don't see any option to open PRs. |
To answer the original question, yes, I'd be interested. There is something to be said for having backwards compatibility to older versions of C++, but supporting constexpr use would be a valuable feature. |
Placement-new also has the unexpected side-effect of resetting the stream. With generators such as This is the subject of Issue #94, where I wrote a fuller explanation. |
Would you be interested in a PR that makes most functions of this library constexpr? I haven't really investigated this yet, but it seems that one could just slab a
CONSTEXPR_IN_ CPP14
-style macro in front of most functions.The only tricky bit would be to make sure that this macro is restrictive enough that it doesn't accidentally add constexpr for a compiler / c++ version combination that nominally supports e.g. c++14 constexpr, but actually has an incomplete implementation which then results in a compilation error even when the function isn't used in a constexpr context.
The text was updated successfully, but these errors were encountered: