[#absl-CreateSeedSeqFrom]
= xref:absl.adoc[absl]::CreateSeedSeqFrom
:relfileprefix: ../
:mrdocs:

Constructs a seed sequence from variates produced by a bit generator&period;

== Synopsis

Declared in `&lt;absl&sol;random&sol;seed&lowbar;sequences&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename URBG&gt;
xref:absl/SeedSeq.adoc[SeedSeq]
CreateSeedSeqFrom(URBG* urbg);
----

== Description

Constructs a seed sequence conforming to &lsqb;rand&period;req&period;seedseq&rsqb;using variates produced by a provided bit generator&period;

You should generally avoid direct construction of seed sequences, but use&hyphen;cases for reuse of a seed sequence to construct identical bit generators may be helpful (eg&period; replaying a simulation whose state is derived from bit generator values)&period;

If `urbg &equals;&equals; nullptr`, then behavior is undefined&period;

Example&colon;

absl&colon;&colon;BitGen my&lowbar;bitgen&semi; auto seed&lowbar;seq &equals; absl&colon;&colon;CreateSeedSeqFrom(&amp;my&lowbar;bitgen)&semi; absl&colon;&colon;BitGen new&lowbar;engine(seed&lowbar;seq)&semi; &sol;&sol; derived from my&lowbar;bitgen, but not &sol;&sol; correlated&period;

== Return Value

A seed sequence derived from the bit generator&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *urbg*
| The bit generator used to produce the seed material&period;
|===


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