AK: Add nodiscard attribute to AllOf functions

This commit is contained in:
Lenny Maiorani 2022-06-26 10:18:56 -06:00 committed by Brian Gianforcaro
parent 65440f9262
commit 318bee03d8
Notes: sideshowbarker 2024-07-17 21:16:31 +09:00

View File

@ -13,7 +13,7 @@
namespace AK {
template<typename TEndIterator, IteratorPairWith<TEndIterator> TIterator>
constexpr bool all_of(
[[nodiscard]] constexpr bool all_of(
TIterator const& begin,
TEndIterator const& end,
auto const& predicate)
@ -25,7 +25,7 @@ constexpr bool all_of(
}
template<IterableContainer Container>
constexpr bool all_of(Container&& container, auto const& predicate)
[[nodiscard]] constexpr bool all_of(Container&& container, auto const& predicate)
{
return all_of(container.begin(), container.end(), predicate);
}