#include <type_traits>
#include <limits>
+#if __cplusplus > 201703L
+# include <concepts>
+#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+#ifdef __cpp_lib_concepts
+ /// Requirements for a uniform random bit generator.
+ template<typename _Gen>
+ concept uniform_random_bit_generator
+ = invocable<_Gen&> && unsigned_integral<invoke_result_t<_Gen&>>
+ && requires
+ {
+ { _Gen::min() } -> same_as<invoke_result_t<_Gen&>>;
+ { _Gen::max() } -> same_as<invoke_result_t<_Gen&>>;
+ requires bool_constant<(_Gen::min() < _Gen::max())>::value;
+ };
+#endif
+
namespace __detail
{
/* Determine whether number is a power of 2. */