microsoft / microsoft/STL

_Fill_memset_is_safe is a dynamic property and should work for multi-byte objects with identical bytes

Open
#3,167 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

Hi, I just wanted to mention that _Fill_memset_is_safe "should" work for types other than char or bool. In particular, it should work for multi-byte objects whose byte representation has the same bytes repeated (with -1 being a typical case). It would be great if this could be implemented. Thanks!

https://github.com/microsoft/STL/blob/2f8342a3a57fb157d881c6a2d42a917d20e413f8/stl/inc/xutility#L4313-L4318

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked section in stl/inc/xutility, then trace how _Fill_memset_is_safe is defined and consumed. Determine the existing tests for this property and extend coverage for multi-byte objects with repeated byte representations; done means the property handles the requested cases without regressing current char and bool behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.