mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:57:47 +00:00
AK: Add nodiscard
attribute to AllOf functions
This commit is contained in:
parent
65440f9262
commit
318bee03d8
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
template<typename TEndIterator, IteratorPairWith<TEndIterator> TIterator>
|
template<typename TEndIterator, IteratorPairWith<TEndIterator> TIterator>
|
||||||
constexpr bool all_of(
|
[[nodiscard]] constexpr bool all_of(
|
||||||
TIterator const& begin,
|
TIterator const& begin,
|
||||||
TEndIterator const& end,
|
TEndIterator const& end,
|
||||||
auto const& predicate)
|
auto const& predicate)
|
||||||
|
@ -25,7 +25,7 @@ constexpr bool all_of(
|
||||||
}
|
}
|
||||||
|
|
||||||
template<IterableContainer Container>
|
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);
|
return all_of(container.begin(), container.end(), predicate);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue