rippled
Loading...
Searching...
No Matches
FlatSets.h
1#pragma once
2
3#include <boost/container/flat_set.hpp>
4
5namespace xrpl {
6
13template <class T>
14void
15SetUnion(boost::container::flat_set<T>& dst, boost::container::flat_set<T> const& src)
16{
17 if (src.empty())
18 return;
19
20 dst.reserve(dst.size() + src.size());
21 dst.insert(boost::container::ordered_unique_range_t{}, src.begin(), src.end());
22}
23
24} // namespace xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
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:15