STL: Consider cleaning up and numbering static_assert messages
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
MSVC's compiler warnings and errors are numbered. Somewhat recently, we started numbering the STL's deprecation warnings. These unique numbers are searchable (and can be documented, in theory):
However, we haven't been numbering our static_assert messages. We have two numbered #error messages, and that's it:
Our static_assert messages are sometimes detailed:
And sometimes not:
We should consider cleaning up our static_assert messages to be uniformly detailed (with Standardese citations when possible), and numbering them. The questions that we need to answer are:
- What numbers should we use? My initial thought is to continue imitating the compiler:
STL1000series for fatal errors (e.g. using an intolerably old compiler is a configuration error that needs to be fixed before dealing with anything else)STL2000series (eventuallySTL3000series) for ordinary errorsSTL4000series (eventuallySTL5000series) for warnings
- How do we ensure that numbers are uniquely used, and never reused? For warnings, we follow the conventions:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the numbered deprecation warnings and #error messages in stl/inc/yvals_core.h with the static_assert messages in stl/inc/type_traits. Determine a numbering scheme and how uniqueness and non-reuse should be maintained. Done means the project has agreed conventions for uniformly detailed, appropriately numbered static_assert messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- developer-experience, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100