Is it proper to always use std:: on C functions mentioned in examples?
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[meta.const.eval] has this code example:
constexpr void f(unsigned char *p, int n) {
if (std::is_constant_evaluated()) { // should not be a constexpr if statement
for (int k = 0; k<n; ++k) p[k] = 0;
} else {
memset(p, 0, n); // not a core constant expression
}
}
Should this say std::memset instead of memset to be more consistent with the rest of C++? There are a few other cases in which std:: is omitted for C standard functions.
This is being rather pedantic, because anyone reading the Standard would know what is meant by memset here.
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
Inspect the [meta.const.eval] example and compare its use of C standard functions with nearby examples in the draft. Check the draft's source conventions for std:: qualification, then update the affected examples if maintainers confirm the preferred style; done means the examples consistently follow the chosen convention.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100