41#ifdef PB_DS_CLASS_C_DEC
43#pragma GCC system_header
49 num_distinct_sizes_32_bit = 30,
50 num_distinct_sizes_64_bit = 62,
51 num_distinct_sizes =
sizeof(std::size_t) != 8 ?
52 num_distinct_sizes_32_bit : num_distinct_sizes_64_bit,
57 static const std::size_t g_a_sizes[num_distinct_sizes_64_bit] =
89 (std::size_t)8589934583ull,
90 (std::size_t)17179869143ull,
91 (std::size_t)34359738337ull,
92 (std::size_t)68719476731ull,
93 (std::size_t)137438953447ull,
94 (std::size_t)274877906899ull,
95 (std::size_t)549755813881ull,
96 (std::size_t)1099511627689ull,
97 (std::size_t)2199023255531ull,
98 (std::size_t)4398046511093ull,
99 (std::size_t)8796093022151ull,
100 (std::size_t)17592186044399ull,
101 (std::size_t)35184372088777ull,
102 (std::size_t)70368744177643ull,
103 (std::size_t)140737488355213ull,
104 (std::size_t)281474976710597ull,
105 (std::size_t)562949953421231ull,
106 (std::size_t)1125899906842597ull,
107 (std::size_t)2251799813685119ull,
108 (std::size_t)4503599627370449ull,
109 (std::size_t)9007199254740881ull,
110 (std::size_t)18014398509481951ull,
111 (std::size_t)36028797018963913ull,
112 (std::size_t)72057594037927931ull,
113 (std::size_t)144115188075855859ull,
114 (std::size_t)288230376151711717ull,
115 (std::size_t)576460752303423433ull,
116 (std::size_t)1152921504606846883ull,
117 (std::size_t)2305843009213693951ull,
118 (std::size_t)4611686018427387847ull,
119 (std::size_t)9223372036854775783ull,
120 (std::size_t)18446744073709551557ull,
128hash_prime_size_policy(size_type n) : m_start_size(n)
129{ m_start_size = get_nearest_larger_size(n); }
134swap(PB_DS_CLASS_C_DEC& other)
135{
std::swap(m_start_size, other.m_start_size); }
138inline PB_DS_CLASS_C_DEC::size_type
140get_nearest_larger_size(size_type n)
const
142 const std::size_t*
const p_upper = std::upper_bound(detail::g_a_sizes,
143 detail::g_a_sizes + detail::num_distinct_sizes, n);
145 if (p_upper == detail::g_a_sizes + detail::num_distinct_sizes)
146 __throw_resize_error();
151inline PB_DS_CLASS_C_DEC::size_type
153get_nearest_smaller_size(size_type n)
const
155 const std::size_t* p_lower = std::lower_bound(detail::g_a_sizes,
156 detail::g_a_sizes + detail::num_distinct_sizes, n);
158 if (*p_lower >= n && p_lower != detail::g_a_sizes)
160 if (*p_lower < m_start_size)
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.