Feature: Annotate API's with [[nodiscard]] if the compiler supports it.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice if the functions which return values like DetourAttach(..) were marked as [[nodiscard]] to catch bugs where the caller does not properly observe the return value of the operation.
You can feature detect [[nodiscard]] support by using the __has_cpp_attribute(nodiscard) macro.
Contributor guide
No contributing guide indexed for this repository
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 locating the public API declarations for functions that return operation results, including DetourAttach, and review how the project handles compiler feature detection. Use __has_cpp_attribute(nodiscard) to determine support; done means the applicable APIs are conditionally annotated without breaking compilers that lack the attribute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100