https://bugs.documentfoundation.org/show_bug.cgi?id=153294

--- Comment #15 from Hossein <[email protected]> ---
(In reply to Arkadiy Illarionov from comment #14)
> When this approach should be preferred over all_of, any_of or none_of in
> https://bugs.documentfoundation.org/show_bug.cgi?id=153109?
> In my opinion all_of/any_of would make code more readable in
> https://gerrit.libreoffice.org/c/core/+/194968, no need to compare with
> container's end().
As the names imply, when one needs the contents (for copy, find or remove),
then using functions from here (copy_if, find_if or remove_if) makes sense. If
someone wants to only check/validate something, then using all_of, any_of or
none_of (and also contains function) is the way to go.

I agree that in the above patch for IsValid() function, all_of() is the correct
choice. It is obviously a validation over a container. I'll add a comment
there.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to