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

Good error message when using unsupported C++ version #50

Open
2 tasks
bretbrownjr opened this issue Oct 14, 2024 · 2 comments
Open
2 tasks

Good error message when using unsupported C++ version #50

bretbrownjr opened this issue Oct 14, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed mentoring available Guidance and support available if required

Comments

@bretbrownjr
Copy link
Contributor

Motivation

Beman contributors, users, and maintainers will sometimes use a C++ version that is unsupported by a given project. There should be clear feedback when this happens, especially when it happens accidentally.

Completion Criteria

This issue will be complete when:

  • There is clear error message is printed when using the exemplar repo with an unsupported C++ version
  • The Beman Standard is updated to either recommend or require that all Beman libraries do likewise

Guidance

A user-unfriendly error message might be a compiler returning an error like: error: expected '(' before 'constexpr'.

Instead, we would like something more literally describing to the user that the C++ version needs to use C++23 or newer.

Mentor

@bretbrownjr is happy to discuss, review, and answer any questions.

@bretbrownjr bretbrownjr added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed mentoring available Guidance and support available if required labels Oct 14, 2024
@bretbrownjr bretbrownjr changed the title Clear error message when using unsupported C++ version Good error message when using unsupported C++ version Oct 14, 2024
@wusatosi
Copy link
Member

Related: bemanproject/exemplar#40

There's no current consensus on the approach.

@wusatosi
Copy link
Member

Honestly I would advocate for a requirement to add a section in the README/ docs that explains what is the minimum C++ requirement in current project and what would it take to lower it (basically explaining why it is what it is).

We can then add a detection CMake script in exemplar that basically denies configuration and spits out "Minimum version: xx. Read the README for why".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed mentoring available Guidance and support available if required
Projects
None yet
Development

No branches or pull requests

2 participants