Issue 160577
Summary `<string>`: `string::resize_and_overwrite` missing _Mandates_
Labels new issue
Assignees
Reporter hewillk
    From [[string.capacity]](https://eel.is/c++draft/string.capacity#8):

> Mandates: OP has an integer-like type ([[iterator.concept.winc]](https://eel.is/c++draft/iterator.concept.winc)).

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

```cpp
#include <string>

int main() {
  std::string s;
 s.resize_and_overwrite(10, [](char*, std::size_t) { return true; });
}
```
https://godbolt.org/z/YEshcM1P5
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to