Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tst_ContainerApiSymmetry: fix mutable lambda anti-pattern
STL algorithms, in general, don't specify how often the function objects passed to them are copied during the run of the algorithm. While generate_n is above any reasonable suspicion of copying the function object after the first invocation, passing a mutable lambda containing the counter is still an anti-pattern we don't want people to copy. Fix in the usual way, by keeping the counter external to the lambda. As a drive-by, replace post- with pre-increment. Amends dc091e7. Pick-to: 6.5 6.2 Change-Id: I9c44e769fd41e5f7157179a2be4c3534424cf913 Reviewed-by: Ivan Solovev <[email protected]>
- Loading branch information