[libcxx-commits] [PATCH] D130330: [libc++][NFC] Add checks for lifetime issues in classic algorithms.
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 26 12:11:49 PDT 2022
var-const marked an inline comment as done.
var-const added inline comments.
================
Comment at: libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp:157
+ assert(!rhs.moved_from_);
+ assert(rhs.moved_from_ = true);
+
----------------
huixie90 wrote:
> is this intended? why is the assignment inside an `assert`. I think in general it is not a good idea to make `assert` have side effects, as it makes program behaves differently with different compiler flags
Thanks for spotting, this was a copy-paste error.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130330/new/
https://reviews.llvm.org/D130330
More information about the libcxx-commits
mailing list