@@ -150,9 +150,9 @@ class FastRandomContext
150
150
uint64_t bitbuf;
151
151
int bitbuf_size;
152
152
153
- void RandomSeed ();
153
+ void RandomSeed () noexcept ;
154
154
155
- void FillBitBuffer ()
155
+ void FillBitBuffer () noexcept
156
156
{
157
157
bitbuf = rand64 ();
158
158
bitbuf_size = 64 ;
@@ -213,15 +213,15 @@ class FastRandomContext
213
213
214
214
/* * Generate random bytes. */
215
215
template <typename B = unsigned char >
216
- std::vector<B> randbytes (size_t len)
216
+ std::vector<B> randbytes (size_t len) noexcept
217
217
{
218
218
std::vector<B> ret (len);
219
219
fillrand (MakeWritableByteSpan (ret));
220
220
return ret;
221
221
}
222
222
223
223
/* * Fill a byte Span with random bytes. */
224
- void fillrand (Span<std::byte> output);
224
+ void fillrand (Span<std::byte> output) noexcept ;
225
225
226
226
/* * Generate a random 32-bit integer. */
227
227
uint32_t rand32 () noexcept { return randbits (32 ); }
@@ -239,7 +239,7 @@ class FastRandomContext
239
239
240
240
/* * Return the time point advanced by a uniform random duration. */
241
241
template <typename Tp>
242
- Tp rand_uniform_delay (const Tp& time, typename Tp::duration range)
242
+ Tp rand_uniform_delay (const Tp& time, typename Tp::duration range) noexcept
243
243
{
244
244
return time + rand_uniform_duration<Tp>(range);
245
245
}
@@ -256,8 +256,8 @@ class FastRandomContext
256
256
257
257
// Compatibility with the UniformRandomBitGenerator concept
258
258
typedef uint64_t result_type;
259
- static constexpr uint64_t min () { return 0 ; }
260
- static constexpr uint64_t max () { return std::numeric_limits<uint64_t >::max (); }
259
+ static constexpr uint64_t min () noexcept { return 0 ; }
260
+ static constexpr uint64_t max () noexcept { return std::numeric_limits<uint64_t >::max (); }
261
261
inline uint64_t operator ()() noexcept { return rand64 (); }
262
262
};
263
263
0 commit comments