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

Minimal C++ requirement #11

Open
robert-andrzejuk opened this issue Feb 7, 2025 · 3 comments
Open

Minimal C++ requirement #11

robert-andrzejuk opened this issue Feb 7, 2025 · 3 comments

Comments

@robert-andrzejuk
Copy link
Collaborator

The experimental implementations (for example GCC) are locked behind:

 #if __cplusplus >= 202002L

std::invocable a useful concept is only available from C++20 upwards.

A C++23 feature which (maybe) should be taken under consideration is "static operator()".

GCC and clang have already a C++23 setting.
MSVC does not.

If agreed upon, this requirement needs cmake script files changes.

@JeffGarland
Copy link
Member

I think we're finding for most Beman libs it's going below C++20 isn't a productive use of time. So for me that's the minimum.

@robert-andrzejuk can you expound more on what you're thinking with static operator()?

@robert-andrzejuk
Copy link
Collaborator Author

@robert-andrzejuk can you expound more on what you're thinking with static operator()?

https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2022/p1169r4.html

This allows lambdas to be static, which allows operator() to be static.

In the demo implementation, I had to consider this case when calling the check functions.

@wusatosi
Copy link
Member

wusatosi commented Feb 8, 2025

Note that <experimental/scope> header is only available for C++20 and above on GCC and LLVM.

In my experience with other library, the main friction is concepts, it is painful to emulate requires with enable_if.

robert-andrzejuk added a commit that referenced this issue Feb 9, 2025
This resolves #11
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

Successfully merging a pull request may close this issue.

3 participants