isocpp / isocpp/CppCoreGuidelines
Should gsl::narrow include slicing
Open
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 45.3k
- Forks
- 5.6k
- PR merge metrics
- No merged PRs in 30d
Description
Re: Microsoft/GSL#917
Should narrow and narrow_cast also apply to slicing, because slicing also allows for going from larger to smaller ranges of value. Both could be considered lossy.
Thanks.
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 reviewing the question in Microsoft/GSL#917 and the definitions of gsl::narrow and narrow_cast. Determine whether slicing is intended to be covered as a lossy conversion, then identify the relevant C++ Core Guidelines guidance to update or clarify. Done means the scope is decided and the guidance or issue resolution states how slicing is treated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100