Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add missing Mandates forresize_and_overwrite#5695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@frederick-vs-ja
Copy link
Contributor

Currently, MSVC STL hasn't implemented theMandates in[string.capacity]/8:

Mandates:OP has an integer-like type ([iterator.concept.winc]).

As a result, the following ill-formed program is accepted (Godbolt link):

#include<cstddef>#include<string>intmain() {    std::string{}.resize_and_overwrite(0, [](constchar*, std::size_t) {structNotIntegerLike {operatorstd::size_t()const {return0;            }        };return NotIntegerLike{};    });}

This PR adds the missingstatic_assert and expands coverage forGH-2524 to all supported (cv-unqualified) integer-like types.

@frederick-vs-ja

This comment was marked as resolved.

@frederick-vs-jafrederick-vs-jaforce-pushed theresize_and_overwrite-integer-like branch frome233688 toc761d14CompareAugust 26, 2025 08:02
@StephanTLavavejStephanTLavavej added the bugSomething isn't working labelAug 26, 2025
@StephanTLavavejStephanTLavavej self-assigned thisAug 29, 2025
@StephanTLavavejStephanTLavavej removed their assignmentSep 6, 2025
@StephanTLavavejStephanTLavavej moved this fromInitial Review toReady To Merge inSTL Code ReviewsSep 6, 2025
@StephanTLavavej
Copy link
Member

Thanks! 😻 I pushed very minor changes.

@StephanTLavavejStephanTLavavej moved this fromReady To Merge toMerging inSTL Code ReviewsSep 10, 2025
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed

@StephanTLavavejStephanTLavavej merged commita0239a5 intomicrosoft:mainSep 10, 2025
39 checks passed
@github-project-automationgithub-project-automationbot moved this fromMerging toDone inSTL Code ReviewsSep 10, 2025
@StephanTLavavej
Copy link
Member

Thanks for noticing and fixing this missing enforcement! 🎉 🚀 🐱

@frederick-vs-jafrederick-vs-ja deleted the resize_and_overwrite-integer-like branchSeptember 10, 2025 23:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@StephanTLavavejStephanTLavavejStephanTLavavej approved these changes

Assignees

No one assigned

Labels

bugSomething isn't working

Projects

Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@frederick-vs-ja@StephanTLavavej

[8]ページ先頭

©2009-2025 Movatter.jp