folly icon indicating copy to clipboard operation
folly copied to clipboard

IsZeroInitializable reflects value-initialization, not default-construction

Open Quuxplusone opened this issue 2 years ago • 1 comments

This commit updates some comments and unit-tests so that they reflect the current state of the world: IsZeroInitializable currently answers the question "Can T t = T(); be implemented with memset?" That's the reason it's currently false even for trivially default-constructible class and union types: there exist trivially default-constructible types (such as S3 in the new unit-test) which are nevertheless non-trivially value-initializable.

Quuxplusone avatar Jun 24 '23 18:06 Quuxplusone

@Orvid has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Jun 27 '23 18:06 facebook-github-bot

@Orvid merged this pull request in facebook/folly@75d710a53a05ac829f6789eafd72d7140027283d.

facebook-github-bot avatar Jun 28 '23 18:06 facebook-github-bot