1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

AK: Fix busted Trie test

This wasn't testing anything ^^'
This commit is contained in:
AnotherTest 2020-12-26 14:43:27 +03:30 committed by Andreas Kling
parent ad646420dd
commit 1c9d28d212
2 changed files with 22 additions and 0 deletions

View file

@ -183,6 +183,21 @@ public:
return static_cast<BaseType&>(*last_root_node);
}
template<typename It, typename ProvideMetadataFunction>
BaseType& insert(
const It& begin, const It& end, MetadataType metadata, ProvideMetadataFunction provide_missing_metadata) requires(!IsSame<MetadataType, decltype(nullptr)>::value)
{
auto it = begin;
return insert(it, end, move(metadata), move(provide_missing_metadata));
}
template<typename It>
BaseType& insert(const It& begin, const It& end) requires(IsSame<MetadataType, decltype(nullptr)>::value)
{
auto it = begin;
return insert(it, end);
}
ConstIterator begin() const { return ConstIterator(*this); }
ConstIterator end() const { return ConstIterator::end(); }