[#RandomNumberGenerator]
= RandomNumberGenerator
:mrdocs:

A concept for RandomMixin&hyphen;based random number generators&period;

== Synopsis

Declared in `&lt;random&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
concept RandomNumberGenerator = requires(T&amp; rng, std&colon;&colon;span&lt;std&colon;&colon;byte&gt; s) &lcub;
    &sol;&sol; A random number generator must provide rand64()&period;
    &lcub; rng&period;rand64() &rcub; noexcept &hyphen;&gt; std&colon;&colon;same&lowbar;as&lt;uint64&lowbar;t&gt;&semi;
    &sol;&sol; A random number generator must derive from RandomMixin, which adds other rand&ast; functions&period;
    requires std&colon;&colon;derived&lowbar;from&lt;std&colon;&colon;remove&lowbar;reference&lowbar;t&lt;T&gt;, RandomMixin&lt;std&colon;&colon;remove&lowbar;reference&lowbar;t&lt;T&gt;&gt;&gt;&semi;
&rcub;;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
