[PATCH] D31802: Add methods to find the next *unset* bits in a bit vector
Adrian McCarthy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 11:05:35 PDT 2017
amccarth added a comment.
Not really in the scope of this change, but, since BitVector has these STL-like methods, 'twould be nice if there were a BitVector::npos analogous to std::basic_string::npos rather than having all the users of the class have to hardcode the magic value or make vague checks like `>= 0`.
I realize that these methods are returning an `int` rather than a `size_type` like the corresponding methods on strings. Still, magic sentinel values are magic sentinel values, and the usage would be more consistent.
https://reviews.llvm.org/D31802
More information about the llvm-commits
mailing list