rippled
Loading...
Searching...
No Matches
FlatSets.h
1#ifndef XRPL_APP_PATHS_IMPL_FLAT_SETS_H_INCLUDED
2#define XRPL_APP_PATHS_IMPL_FLAT_SETS_H_INCLUDED
3
4#include <boost/container/flat_set.hpp>
5
6namespace ripple {
7
14template <class T>
15void
17 boost::container::flat_set<T>& dst,
18 boost::container::flat_set<T> const& src)
19{
20 if (src.empty())
21 return;
22
23 dst.reserve(dst.size() + src.size());
24 dst.insert(
25 boost::container::ordered_unique_range_t{}, src.begin(), src.end());
26}
27
28} // namespace ripple
29
30#endif
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
void SetUnion(boost::container::flat_set< T > &dst, boost::container::flat_set< T > const &src)
Given two flat sets dst and src, compute dst = dst union src.
Definition FlatSets.h:16