diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-12-26 14:43:27 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-26 12:32:27 +0100 |
commit | 1c9d28d212e31060b9fb34107c7d608cb6cade02 (patch) | |
tree | 477ca926841ca63086638973e56ea1f8c054fa11 /AK/Trie.h | |
parent | ad646420dd25bff4532faed3f4919168df01144c (diff) | |
download | serenity-1c9d28d212e31060b9fb34107c7d608cb6cade02.zip |
AK: Fix busted Trie test
This wasn't testing anything ^^'
Diffstat (limited to 'AK/Trie.h')
-rw-r--r-- | AK/Trie.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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(); } |