`<string>`: `string::resize_and_overwrites` missing _Mandates_ · Issue #5739 · microsoft/STL · GitHub
Skip to content

<string>: string::resize_and_overwrites missing _Mandates_ #5739

Description

@hewillk

From [string.capacity]:

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

The following should be rejected because bool is not an integer-like type:

#include <string>

int main() {
  std::string s;
  s.resize_and_overwrite(10, [](char*, std::size_t) { return true; });
}

https://godbolt.org/z/YEshcM1P5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions