llvm-project
692c5cdb - [libc++] Do not call `reserve` in flat containers if underlying container is user defined (#140379)

Commit
183 days ago
[libc++] Do not call `reserve` in flat containers if underlying container is user defined (#140379) This is brought up in the LWG reflector. We currently call `reserve` if the underlying container has one. But the spec does not specify what `reserve` should do for Sequence Container. So in theory if the underlying container is user defined type and it can have a function called `reserve` which does something completely different. The fix is to just call `reserve` for STL containers if it has one
Author
Parents
Loading