llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

`basic_string::substr()` passes the allocator to the newly created string

Open philnik777 opened this issue 2 years ago • 0 comments

libc++ is currently non-conforming in basic_string::substr(), because it returns basic_string(*this, __pos, __n, __alloc()) while the standard says it should return basic_string(*this, __pos, __n). See https://wg21.link/LWG3752.

philnik777 avatar Aug 17 '22 09:08 philnik777