11#ifndef INCLUDED_BDLC_FLATHASHSET_CPP03
12#define INCLUDED_BDLC_FLATHASHSET_CPP03
63#ifdef COMPILING_BDLC_FLATHASHSET_H
74template <
class KEY,
class HASH,
class EQUAL>
75bool operator==(
const FlatHashSet<KEY, HASH, EQUAL> &a,
76 const FlatHashSet<KEY, HASH, EQUAL> &b);
78template <
class KEY,
class HASH,
class EQUAL>
79bool operator!=(
const FlatHashSet<KEY, HASH, EQUAL> &a,
80 const FlatHashSet<KEY, HASH, EQUAL> &b);
82template <
class KEY,
class HASH,
class EQUAL>
83void swap(FlatHashSet<KEY, HASH, EQUAL>& a, FlatHashSet<KEY, HASH, EQUAL>& b);
93struct FlatHashSet_EntryUtil
96#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
99#ifndef BDLC_FLATHASHSET_VARIADIC_LIMIT
100#define BDLC_FLATHASHSET_VARIADIC_LIMIT 10
102#ifndef BDLC_FLATHASHSET_VARIADIC_LIMIT_A
103#define BDLC_FLATHASHSET_VARIADIC_LIMIT_A BDLC_FLATHASHSET_VARIADIC_LIMIT
105#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 0
111#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 1
112 template <
class ARGS_01>
119#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 2
120 template <
class ARGS_01,
129#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 3
130 template <
class ARGS_01,
141#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 4
142 template <
class ARGS_01,
155#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 5
156 template <
class ARGS_01,
171#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 6
172 template <
class ARGS_01,
189#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 7
190 template <
class ARGS_01,
209#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 8
210 template <
class ARGS_01,
231#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 9
232 template <
class ARGS_01,
255#if BDLC_FLATHASHSET_VARIADIC_LIMIT_A >= 10
256 template <
class ARGS_01,
284 template <
class... ARGS>
296 template <
class KEY_TYPE>
303 static const ENTRY&
key(
const ENTRY& entry);
318template <
class KEY,
class HASH,
class EQUAL>
325 typedef FlatHashTable<KEY,
327 FlatHashSet_EntryUtil<KEY>,
336 template <
class K,
class H,
class E>
337 friend void swap(FlatHashSet<K, H, E>&, FlatHashSet<K, H, E>&);
406 template <
class INPUT_ITERATOR>
410 template <
class INPUT_ITERATOR>
415 template <
class INPUT_ITERATOR>
421 template <
class INPUT_ITERATOR>
429#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
507#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
523#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
526#ifndef BDLC_FLATHASHSET_VARIADIC_LIMIT
527#define BDLC_FLATHASHSET_VARIADIC_LIMIT 10
529#ifndef BDLC_FLATHASHSET_VARIADIC_LIMIT_B
530#define BDLC_FLATHASHSET_VARIADIC_LIMIT_B BDLC_FLATHASHSET_VARIADIC_LIMIT
532#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 0
537#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 1
538 template <
class ARGS_01>
543#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 2
544 template <
class ARGS_01,
551#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 3
552 template <
class ARGS_01,
561#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 4
562 template <
class ARGS_01,
573#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 5
574 template <
class ARGS_01,
587#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 6
588 template <
class ARGS_01,
603#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 7
604 template <
class ARGS_01,
621#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 8
622 template <
class ARGS_01,
641#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 9
642 template <
class ARGS_01,
663#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 10
664 template <
class ARGS_01,
688#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 0
692#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 1
693 template <
class ARGS_01>
698#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 2
699 template <
class ARGS_01,
706#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 3
707 template <
class ARGS_01,
716#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 4
717 template <
class ARGS_01,
728#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 5
729 template <
class ARGS_01,
742#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 6
743 template <
class ARGS_01,
758#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 7
759 template <
class ARGS_01,
776#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 8
777 template <
class ARGS_01,
796#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 9
797 template <
class ARGS_01,
818#if BDLC_FLATHASHSET_VARIADIC_LIMIT_B >= 10
819 template <
class ARGS_01,
845 template <
class... ARGS>
849 template <
class... ARGS>
861 bsl::size_t
erase(
const KEY& key);
881#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
882 template <
class KEY_TYPE>
893 template <
class KEY_TYPE>
905#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
906 template <
class KEY_TYPE>
915 template <
class KEY_TYPE>
936 template <
class INPUT_ITERATOR>
937 void insert(INPUT_ITERATOR first, INPUT_ITERATOR last);
939#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
945 void insert(bsl::initializer_list<KEY> values);
955 void rehash(bsl::size_t minimumCapacity);
969 void reserve(bsl::size_t numEntries);
991 bool contains(
const KEY& key)
const;
996 bsl::size_t
count(
const KEY& key)
const;
1010 const KEY& key)
const;
1040 bsl::size_t
size()
const;
1077 bsl::ostream&
print(bsl::ostream& stream,
1079 int spacesPerLevel = 4)
const;
1089template <
class KEY,
class HASH,
class EQUAL>
1090bool operator==(
const FlatHashSet<KEY, HASH, EQUAL> &lhs,
1091 const FlatHashSet<KEY, HASH, EQUAL> &rhs);
1098template <
class KEY,
class HASH,
class EQUAL>
1099bool operator!=(
const FlatHashSet<KEY, HASH, EQUAL> &lhs,
1100 const FlatHashSet<KEY, HASH, EQUAL> &rhs);
1107template <
class KEY,
class HASH,
class EQUAL>
1108bsl::ostream&
operator<<(bsl::ostream& stream,
1109 const FlatHashSet<KEY, HASH, EQUAL>& set);
1117template <
class KEY,
class HASH,
class EQUAL>
1118void swap(FlatHashSet<KEY, HASH, EQUAL>& a, FlatHashSet<KEY, HASH, EQUAL>& b);
1129#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1132#ifndef BDLC_FLATHASHSET_VARIADIC_LIMIT
1133#define BDLC_FLATHASHSET_VARIADIC_LIMIT 10
1135#ifndef BDLC_FLATHASHSET_VARIADIC_LIMIT_C
1136#define BDLC_FLATHASHSET_VARIADIC_LIMIT_C BDLC_FLATHASHSET_VARIADIC_LIMIT
1138#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 0
1139template <
class ENTRY>
1152#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 1
1153template <
class ENTRY>
1154template <
class ARGS_01>
1169#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 2
1170template <
class ENTRY>
1171template <
class ARGS_01,
1189#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 3
1190template <
class ENTRY>
1191template <
class ARGS_01,
1212#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 4
1213template <
class ENTRY>
1214template <
class ARGS_01,
1238#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 5
1239template <
class ENTRY>
1240template <
class ARGS_01,
1267#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 6
1268template <
class ENTRY>
1269template <
class ARGS_01,
1299#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 7
1300template <
class ENTRY>
1301template <
class ARGS_01,
1334#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 8
1335template <
class ENTRY>
1336template <
class ARGS_01,
1372#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 9
1373template <
class ENTRY>
1374template <
class ARGS_01,
1413#if BDLC_FLATHASHSET_VARIADIC_LIMIT_C >= 10
1414template <
class ENTRY>
1415template <
class ARGS_01,
1460template <
class ENTRY>
1461template <
class... ARGS>
1477template <
class ENTRY>
1493template <
class ENTRY>
1505template <
class KEY,
class HASH,
class EQUAL>
1508: d_impl(0, HASH(), EQUAL())
1512template <
class KEY,
class HASH,
class EQUAL>
1514FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(
bslma::Allocator *basicAllocator)
1515: d_impl(0, HASH(), EQUAL(), basicAllocator)
1519template <
class KEY,
class HASH,
class EQUAL>
1521FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(bsl::size_t capacity)
1522: d_impl(capacity, HASH(), EQUAL())
1526template <
class KEY,
class HASH,
class EQUAL>
1528FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(bsl::size_t capacity,
1530: d_impl(capacity, HASH(), EQUAL(), basicAllocator)
1534template <
class KEY,
class HASH,
class EQUAL>
1536FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(bsl::size_t capacity,
1539: d_impl(capacity, hash, EQUAL(), basicAllocator)
1543template <
class KEY,
class HASH,
class EQUAL>
1545FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(bsl::size_t capacity,
1549: d_impl(capacity, hash, equal, basicAllocator)
1553template <
class KEY,
class HASH,
class EQUAL>
1554template <
class INPUT_ITERATOR>
1556FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(INPUT_ITERATOR first,
1557 INPUT_ITERATOR last,
1559: d_impl(0, HASH(), EQUAL(), basicAllocator)
1561 insert(first, last);
1564template <
class KEY,
class HASH,
class EQUAL>
1565template <
class INPUT_ITERATOR>
1567FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(INPUT_ITERATOR first,
1568 INPUT_ITERATOR last,
1569 bsl::size_t capacity,
1571: d_impl(capacity, HASH(), EQUAL(), basicAllocator)
1573 insert(first, last);
1576template <
class KEY,
class HASH,
class EQUAL>
1577template <
class INPUT_ITERATOR>
1579FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(INPUT_ITERATOR first,
1580 INPUT_ITERATOR last,
1581 bsl::size_t capacity,
1584: d_impl(capacity, hash, EQUAL(), basicAllocator)
1586 insert(first, last);
1589template <
class KEY,
class HASH,
class EQUAL>
1590template <
class INPUT_ITERATOR>
1592FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(INPUT_ITERATOR first,
1593 INPUT_ITERATOR last,
1594 bsl::size_t capacity,
1598: d_impl(capacity, hash, equal, basicAllocator)
1600 insert(first, last);
1603#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1604template <
class KEY,
class HASH,
class EQUAL>
1606FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(
1607 bsl::initializer_list<KEY> values,
1609: FlatHashSet(values.
begin(),
1618template <
class KEY,
class HASH,
class EQUAL>
1620FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(
1621 bsl::initializer_list<KEY> values,
1622 bsl::size_t capacity,
1624: FlatHashSet(values.
begin(),
1633template <
class KEY,
class HASH,
class EQUAL>
1635FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(
1636 bsl::initializer_list<KEY> values,
1637 bsl::size_t capacity,
1640: FlatHashSet(values.
begin(),
1649template <
class KEY,
class HASH,
class EQUAL>
1651FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(
1652 bsl::initializer_list<KEY> values,
1653 bsl::size_t capacity,
1657: FlatHashSet(values.
begin(),
1667template <
class KEY,
class HASH,
class EQUAL>
1669FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(
const FlatHashSet& original,
1671: d_impl(original.d_impl, basicAllocator)
1675template <
class KEY,
class HASH,
class EQUAL>
1677FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(
1679: d_impl(
bslmf::MovableRefUtil::move(
1680 bslmf::MovableRefUtil::access(original).d_impl))
1684template <
class KEY,
class HASH,
class EQUAL>
1686FlatHashSet<KEY, HASH, EQUAL>::FlatHashSet(
1689: d_impl(
bslmf::MovableRefUtil::move(
1690 bslmf::MovableRefUtil::access(original).d_impl),
1695template <
class KEY,
class HASH,
class EQUAL>
1697FlatHashSet<KEY, HASH, EQUAL>::~FlatHashSet()
1702template <
class KEY,
class HASH,
class EQUAL>
1704FlatHashSet<KEY, HASH, EQUAL>& FlatHashSet<KEY, HASH, EQUAL>::operator=(
1705 const FlatHashSet& rhs)
1707 d_impl = rhs.d_impl;
1712template <
class KEY,
class HASH,
class EQUAL>
1714FlatHashSet<KEY, HASH, EQUAL>& FlatHashSet<KEY, HASH, EQUAL>::operator=(
1717 FlatHashSet& lvalue = rhs;
1724#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1725template <
class KEY,
class HASH,
class EQUAL>
1727FlatHashSet<KEY, HASH, EQUAL>& FlatHashSet<KEY, HASH, EQUAL>::operator=(
1728 bsl::initializer_list<KEY> values)
1730 FlatHashSet tmp(values.begin(),
1733 d_impl.hash_function(),
1735 d_impl.allocator());
1743template <
class KEY,
class HASH,
class EQUAL>
1745void FlatHashSet<KEY, HASH, EQUAL>::clear()
1750#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1753#ifndef BDLC_FLATHASHSET_VARIADIC_LIMIT
1754#define BDLC_FLATHASHSET_VARIADIC_LIMIT 10
1756#ifndef BDLC_FLATHASHSET_VARIADIC_LIMIT_D
1757#define BDLC_FLATHASHSET_VARIADIC_LIMIT_D BDLC_FLATHASHSET_VARIADIC_LIMIT
1759#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 0
1760template <
class KEY,
class HASH,
class EQUAL>
1762FlatHashSet<KEY, HASH, EQUAL>::emplace(
1765 return d_impl.emplace();
1769#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 1
1770template <
class KEY,
class HASH,
class EQUAL>
1771template <
class ARGS_01>
1773FlatHashSet<KEY, HASH, EQUAL>::emplace(
1780#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 2
1781template <
class KEY,
class HASH,
class EQUAL>
1782template <
class ARGS_01,
1785FlatHashSet<KEY, HASH, EQUAL>::emplace(
1794#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 3
1795template <
class KEY,
class HASH,
class EQUAL>
1796template <
class ARGS_01,
1800FlatHashSet<KEY, HASH, EQUAL>::emplace(
1811#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 4
1812template <
class KEY,
class HASH,
class EQUAL>
1813template <
class ARGS_01,
1818FlatHashSet<KEY, HASH, EQUAL>::emplace(
1831#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 5
1832template <
class KEY,
class HASH,
class EQUAL>
1833template <
class ARGS_01,
1839FlatHashSet<KEY, HASH, EQUAL>::emplace(
1854#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 6
1855template <
class KEY,
class HASH,
class EQUAL>
1856template <
class ARGS_01,
1863FlatHashSet<KEY, HASH, EQUAL>::emplace(
1880#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 7
1881template <
class KEY,
class HASH,
class EQUAL>
1882template <
class ARGS_01,
1890FlatHashSet<KEY, HASH, EQUAL>::emplace(
1909#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 8
1910template <
class KEY,
class HASH,
class EQUAL>
1911template <
class ARGS_01,
1920FlatHashSet<KEY, HASH, EQUAL>::emplace(
1941#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 9
1942template <
class KEY,
class HASH,
class EQUAL>
1943template <
class ARGS_01,
1953FlatHashSet<KEY, HASH, EQUAL>::emplace(
1976#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 10
1977template <
class KEY,
class HASH,
class EQUAL>
1978template <
class ARGS_01,
1989FlatHashSet<KEY, HASH, EQUAL>::emplace(
2015#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 0
2016template <
class KEY,
class HASH,
class EQUAL>
2017inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2018FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2019 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator)
2021 return this->emplace().
first;
2025#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 1
2026template <
class KEY,
class HASH,
class EQUAL>
2027template <
class ARGS_01>
2028inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2029FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2030 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2038#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 2
2039template <
class KEY,
class HASH,
class EQUAL>
2040template <
class ARGS_01,
2042inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2043FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2044 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2054#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 3
2055template <
class KEY,
class HASH,
class EQUAL>
2056template <
class ARGS_01,
2059inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2060FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2061 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2073#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 4
2074template <
class KEY,
class HASH,
class EQUAL>
2075template <
class ARGS_01,
2079inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2080FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2081 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2095#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 5
2096template <
class KEY,
class HASH,
class EQUAL>
2097template <
class ARGS_01,
2102inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2103FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2104 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2120#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 6
2121template <
class KEY,
class HASH,
class EQUAL>
2122template <
class ARGS_01,
2128inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2129FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2130 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2148#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 7
2149template <
class KEY,
class HASH,
class EQUAL>
2150template <
class ARGS_01,
2157inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2158FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2159 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2179#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 8
2180template <
class KEY,
class HASH,
class EQUAL>
2181template <
class ARGS_01,
2189inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2190FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2191 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2213#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 9
2214template <
class KEY,
class HASH,
class EQUAL>
2215template <
class ARGS_01,
2224inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2225FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2226 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2250#if BDLC_FLATHASHSET_VARIADIC_LIMIT_D >= 10
2251template <
class KEY,
class HASH,
class EQUAL>
2252template <
class ARGS_01,
2262inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2263FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2264 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2293template <
class KEY,
class HASH,
class EQUAL>
2294template <
class... ARGS>
2296FlatHashSet<KEY, HASH, EQUAL>::emplace(
2302template <
class KEY,
class HASH,
class EQUAL>
2303template <
class... ARGS>
2304inline typename FlatHashSet<KEY, HASH, EQUAL>::iterator
2305FlatHashSet<KEY, HASH, EQUAL>::emplace_hint(
2306 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator,
2316template <
class KEY,
class HASH,
class EQUAL>
2318bsl::size_t FlatHashSet<KEY, HASH, EQUAL>::erase(
const KEY& key)
2320 return d_impl.erase(key);
2323template <
class KEY,
class HASH,
class EQUAL>
2325typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator
2326 FlatHashSet<KEY, HASH, EQUAL>::erase(const_iterator position)
2330 return d_impl.erase(position);
2333template <
class KEY,
class HASH,
class EQUAL>
2335typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator
2336FlatHashSet<KEY, HASH, EQUAL>::erase(const_iterator first, const_iterator last)
2338 return d_impl.erase(first, last);
2341template <
class KEY,
class HASH,
class EQUAL>
2342template <
class INPUT_ITERATOR>
2344void FlatHashSet<KEY, HASH, EQUAL>::insert(INPUT_ITERATOR first,
2345 INPUT_ITERATOR last)
2347 d_impl.insert(first, last);
2350#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
2351template <
class KEY,
class HASH,
class EQUAL>
2353void FlatHashSet<KEY, HASH, EQUAL>::insert(bsl::initializer_list<KEY> values)
2355 insert(values.begin(), values.end());
2359template <
class KEY,
class HASH,
class EQUAL>
2361void FlatHashSet<KEY, HASH, EQUAL>::rehash(bsl::size_t minimumCapacity)
2363 d_impl.rehash(minimumCapacity);
2366template <
class KEY,
class HASH,
class EQUAL>
2368void FlatHashSet<KEY, HASH, EQUAL>::reserve(bsl::size_t numEntries)
2370 d_impl.reserve(numEntries);
2373template <
class KEY,
class HASH,
class EQUAL>
2375void FlatHashSet<KEY, HASH, EQUAL>::reset()
2382template <
class KEY,
class HASH,
class EQUAL>
2384void FlatHashSet<KEY, HASH, EQUAL>::swap(FlatHashSet& other)
2388 d_impl.swap(other.d_impl);
2392template <
class KEY,
class HASH,
class EQUAL>
2394bsl::size_t FlatHashSet<KEY, HASH, EQUAL>::capacity()
const
2396 return d_impl.capacity();
2399template <
class KEY,
class HASH,
class EQUAL>
2401bool FlatHashSet<KEY, HASH, EQUAL>::contains(
const KEY& key)
const
2403 return d_impl.contains(key);
2406template <
class KEY,
class HASH,
class EQUAL>
2408bsl::size_t FlatHashSet<KEY, HASH, EQUAL>::count(
const KEY& key)
const
2410 return d_impl.count(key);
2413template <
class KEY,
class HASH,
class EQUAL>
2415bool FlatHashSet<KEY, HASH, EQUAL>::empty()
const
2417 return d_impl.empty();
2420template <
class KEY,
class HASH,
class EQUAL>
2423 typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator>
2424 FlatHashSet<KEY, HASH, EQUAL>::equal_range(
const KEY& key)
const
2426 return d_impl.equal_range(key);
2429template <
class KEY,
class HASH,
class EQUAL>
2431typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator
2432 FlatHashSet<KEY, HASH, EQUAL>::find(
const KEY& key)
const
2434 return d_impl.find(key);
2437template <
class KEY,
class HASH,
class EQUAL>
2439HASH FlatHashSet<KEY, HASH, EQUAL>::hash_function()
const
2441 return d_impl.hash_function();
2444template <
class KEY,
class HASH,
class EQUAL>
2446EQUAL FlatHashSet<KEY, HASH, EQUAL>::key_eq()
const
2448 return d_impl.key_eq();
2451template <
class KEY,
class HASH,
class EQUAL>
2453float FlatHashSet<KEY, HASH, EQUAL>::load_factor()
const
2455 return d_impl.load_factor();
2458template <
class KEY,
class HASH,
class EQUAL>
2460float FlatHashSet<KEY, HASH, EQUAL>::max_load_factor()
const
2462 return d_impl.max_load_factor();
2465template <
class KEY,
class HASH,
class EQUAL>
2467bsl::size_t FlatHashSet<KEY, HASH, EQUAL>::size()
const
2469 return d_impl.size();
2474template <
class KEY,
class HASH,
class EQUAL>
2476typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator
2477 FlatHashSet<KEY, HASH, EQUAL>::begin()
const
2479 return d_impl.begin();
2482template <
class KEY,
class HASH,
class EQUAL>
2484typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator
2485 FlatHashSet<KEY, HASH, EQUAL>::cbegin()
const
2487 return d_impl.cbegin();
2490template <
class KEY,
class HASH,
class EQUAL>
2492typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator
2493 FlatHashSet<KEY, HASH, EQUAL>::cend()
const
2495 return d_impl.cend();
2498template <
class KEY,
class HASH,
class EQUAL>
2500typename FlatHashSet<KEY, HASH, EQUAL>::const_iterator
2501 FlatHashSet<KEY, HASH, EQUAL>::end()
const
2503 return d_impl.end();
2508template <
class KEY,
class HASH,
class EQUAL>
2512 return d_impl.allocator();
2515template <
class KEY,
class HASH,
class EQUAL>
2516bsl::ostream& FlatHashSet<KEY, HASH, EQUAL>::print(
2517 bsl::ostream& stream,
2519 int spacesPerLevel)
const
2529 const_iterator iter =
begin();
2530 while (iter !=
end()) {
2531 printer.printValue(*iter);
2543template <
class KEY,
class HASH,
class EQUAL>
2546 const FlatHashSet<KEY, HASH, EQUAL>& rhs)
2548 return lhs.d_impl == rhs.d_impl;
2551template <
class KEY,
class HASH,
class EQUAL>
2554 const FlatHashSet<KEY, HASH, EQUAL>& rhs)
2556 return lhs.d_impl != rhs.d_impl;
2559template <
class KEY,
class HASH,
class EQUAL>
2562 const FlatHashSet<KEY, HASH, EQUAL>& set)
2564 return set.print(stream, 0, -1);
2568template <
class KEY,
class HASH,
class EQUAL>
2570void bdlc::swap(FlatHashSet<KEY, HASH, EQUAL>& a,
2571 FlatHashSet<KEY, HASH, EQUAL>& b)
2582template <
class KEY,
class HASH,
class EQUAL>
2583struct HasStlIterators<
bdlc::FlatHashSet<KEY, HASH, EQUAL> >
2591template <
class KEY,
class HASH,
class EQUAL>
2592struct UsesBslmaAllocator<
bdlc::FlatHashSet<KEY, HASH, EQUAL> >
2600# error Not valid except when included from bdlc_flathashset.h
iterator emplace_hint(const_iterator hint, ARGS &&... args)
bsl::enable_if< bsl::is_convertible< KEY_TYPE, KEY >::value, bsl::pair< const_iterator, bool > >::type insert(BSLS_COMPILERFEATURES_FORWARD_REF(KEY_TYPE) value)
Definition bdlc_flathashset.h:840
EQUAL key_eq() const
Definition bdlc_flathashset.h:1515
bsl::size_t count(const KEY &key) const
Definition bdlc_flathashset.h:1477
bsl::pair< iterator, bool > emplace(ARGS &&... args)
EQUAL value_compare
Definition bdlc_flathashset.h:591
const_iterator begin() const
Definition bdlc_flathashset.h:1546
HASH hash_function() const
Definition bdlc_flathashset.h:1508
void reserve(bsl::size_t numEntries)
Definition bdlc_flathashset.h:1437
HASH hasher
Definition bdlc_flathashset.h:592
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bdlc_flathashset.h:1585
const value_type * const_pointer
Definition bdlc_flathashset.h:596
bslma::Allocator * allocator() const
Return the allocator used by this flat hash set to supply memory.
Definition bdlc_flathashset.h:1579
EQUAL key_compare
Definition bdlc_flathashset.h:590
friend void swap(FlatHashSet< K, H, E > &, FlatHashSet< K, H, E > &)
value_type * pointer
Definition bdlc_flathashset.h:595
value_type & reference
Definition bdlc_flathashset.h:593
float load_factor() const
Definition bdlc_flathashset.h:1522
const_iterator find(const KEY &key) const
Definition bdlc_flathashset.h:1501
FlatHashSet()
Definition bdlc_flathashset.h:1120
~FlatHashSet()
Destroy this object and each of its elements.
Definition bdlc_flathashset.h:1310
void clear()
Definition bdlc_flathashset.h:1358
const value_type & const_reference
Definition bdlc_flathashset.h:594
void rehash(bsl::size_t minimumCapacity)
Definition bdlc_flathashset.h:1430
ImplType::const_iterator iterator
Definition bdlc_flathashset.h:597
bsl::size_t size() const
Return the number of elements in this set.
Definition bdlc_flathashset.h:1536
const_iterator cbegin() const
Definition bdlc_flathashset.h:1554
KEY value_type
Definition bdlc_flathashset.h:587
const_iterator cend() const
Definition bdlc_flathashset.h:1562
FlatHashSet & operator=(const FlatHashSet &rhs)
Definition bdlc_flathashset.h:1317
bsl::ptrdiff_t difference_type
Definition bdlc_flathashset.h:589
bsl::size_t capacity() const
Definition bdlc_flathashset.h:1463
bsl::size_t erase(const KEY &key)
Definition bdlc_flathashset.h:1387
void reset()
Definition bdlc_flathashset.h:1444
bsl::size_t size_type
Definition bdlc_flathashset.h:588
ImplType::const_iterator const_iterator
Definition bdlc_flathashset.h:598
bool empty() const
Definition bdlc_flathashset.h:1484
float max_load_factor() const
Definition bdlc_flathashset.h:1529
bool contains(const KEY &key) const
Definition bdlc_flathashset.h:1470
bsl::pair< const_iterator, const_iterator > equal_range(const KEY &key) const
Definition bdlc_flathashset.h:1493
const_iterator end() const
Definition bdlc_flathashset.h:1570
KEY key_type
Definition bdlc_flathashset.h:586
bslstl::ForwardIterator< const KEY, IteratorImp > const_iterator
Definition bdlc_flathashtable.h:334
Definition bslstl_pair.h:1210
static void swap(T *a, T *b)
Definition bslalg_swaputil.h:194
Definition bslh_fibonaccibadhashwrapper.h:165
Definition bslim_printer.h:601
Definition bslma_allocator.h:457
Definition bslmf_movableref.h:751
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
bool operator!=(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
bool operator==(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
void swap(OptionValue &a, OptionValue &b)
Definition bdlc_bitarray.h:503
void swap(BitArray &a, BitArray &b)
bool operator==(const BitArray &lhs, const BitArray &rhs)
bool operator!=(const BitArray &lhs, const BitArray &rhs)
BitArray operator<<(const BitArray &array, bsl::size_t numBits)
T::iterator begin(T &container)
Definition bslstl_iterator.h:1495
T::iterator end(T &container)
Definition bslstl_iterator.h:1523
Definition bdlc_flathashmap.h:1805
Definition balxml_encoderoptions.h:68
Definition bdlbb_blob.h:576
static void constructFromKey(ENTRY *entry, bslma::Allocator *allocator, BSLS_COMPILERFEATURES_FORWARD_REF(KEY_TYPE) key)
static const ENTRY & key(const ENTRY &entry)
Return the specified entry.
Definition bdlc_flathashset.h:1108
static void construct(ENTRY *entry, bslma::Allocator *allocator, ARGS &&... args)
Definition bdlc_flathashset.h:1077
TYPE first
Definition bslstl_pair.h:605
Definition bslmf_enableif.h:525
Definition bslstl_equalto.h:311
static void construct(TARGET_TYPE *address, const ALLOCATOR &allocator)
Definition bslma_constructionutil.h:1243
static MovableRef< t_TYPE > move(t_TYPE &reference) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1060