Quuxplusone / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
https://p1144.godbolt.org/z/jf67zx5hq
Other
1 stars 2 forks source link

[libc++] [test] Counter<T>'s assignment operator shouldn't ++gConstructed #6

Closed Quuxplusone closed 1 year ago

Quuxplusone commented 1 year ago

This has been here since d5f461ca03e30, but assigning into an existing Counter object definitely doesn't create a new object. This causes the count to "leak" higher and higher, inside algorithms based on swapping.

Quuxplusone commented 1 year ago

Merged a9f384994b9d!