Since C++20, it is possible to process containers in an easier form with std::ranges. One can rewrite loops checking a condition over a range with std::ranges functions. It is also simpler compared to C++11 syntax. There are multiple functions available in ranges library: Constrained algorithms (since C++20) https://en.cppreference.com/w/cpp/algorithm/ranges.html These are defined in <algorithm> header: std::ranges::all_of Test the condition on all of the elements std::ranges::any_of Test if any element satisfies the condition std::ranges::none_of Test if no elements satisfies the condition You can find further information below. Above functions are part of "Non-modifying sequence operations": https://en.cppreference.com/w/cpp/algorithm/ranges/all_any_none_of.html The new std::ranges has a simpler syntax compared to the older std::all_of, etc. functions used in tdf#153109, and is a replacement, in most cases. For an example commit, see this patch: Use C++20 std::ranges::all_of instead of a loop https://gerrit.libreoffice.org/c/core/+/196851 Please make sure that you keep the code behavior unchanged.
Set to NEW as EasyHack
Hossein committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/00dfdd0154a25c56723296958b1d08f7fa07763a tdf#170269 Use C++20 std::ranges::all_of instead of a loop It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.