|
|
@@ -18,6 +18,8 @@ class trie;
|
|
|
namespace detail {
|
|
|
template <typename Trie, typename Iter>
|
|
|
class trie_iterator_base;
|
|
|
+ template <typename Iter, typename Trie, typename KS>
|
|
|
+ Iter find_impl(Trie * tr, KS const & keys);
|
|
|
}
|
|
|
|
|
|
template <typename Trie, typename Iter>
|
|
|
@@ -130,11 +132,11 @@ public:
|
|
|
|
|
|
|
|
|
template <typename KS>
|
|
|
- iterator find(KS const & keys) { return find_impl<impl_iterator>(this, keys); }
|
|
|
+ iterator find(KS const & keys) { return detail::find_impl<impl_iterator>(this, keys); }
|
|
|
iterator find(key_type const & key) { return find_impl<impl_iterator>(this, {key}); }
|
|
|
iterator find(std::initializer_list<key_type> keys) { return find_impl<impl_iterator>(this, keys); }
|
|
|
template <typename KS>
|
|
|
- const_iterator find(KS const & keys) const { return find_impl<impl_const_iterator>(this, keys); }
|
|
|
+ const_iterator find(KS const & keys) const { return detail::find_impl<impl_const_iterator>(this, keys); }
|
|
|
const_iterator find(key_type const & key) const { return find_impl<impl_const_iterator>(this, {key}); }
|
|
|
const_iterator find(std::initializer_list<key_type> keys) const { return find_impl<impl_const_iterator>(this, keys); }
|
|
|
|
|
|
@@ -147,10 +149,10 @@ public:
|
|
|
private:
|
|
|
void drop(iterator it);
|
|
|
template <typename Iter, typename Trie, typename KS>
|
|
|
- static Iter find_impl(Trie * tr, KS const & keys);
|
|
|
+ friend Iter detail::find_impl(Trie * tr, KS const & keys);
|
|
|
template <typename Iter, typename Trie>
|
|
|
static Iter find_impl(Trie * tr, std::initializer_list<key_type> keys) {
|
|
|
- return find_impl<Iter, Trie, std::initializer_list<key_type>>(tr, keys);
|
|
|
+ return detail::find_impl<Iter, Trie, std::initializer_list<key_type>>(tr, keys);
|
|
|
}
|
|
|
template <typename KS, typename... Args>
|
|
|
std::pair<impl_iterator, bool> emplace_impl(KS && keys, Args &&... args);
|