Skip to content

Commit

Permalink
AK: Add nodiscard attribute to AllOf functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm5180 authored and bgianfo committed Jul 4, 2022
1 parent 65440f9 commit 318bee0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AK/AllOf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
}
Expand Down

0 comments on commit 318bee0

Please sign in to comment.