[rand.adapt.general]

# 29 Numerics library [[numerics]](./#numerics)

## 29.5 Random number generation [[rand]](rand#adapt.general)

### 29.5.5 Random number engine adaptor class templates [[rand.adapt]](rand.adapt#general)

#### 29.5.5.1 General [rand.adapt.general]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L3393)

Each type instantiated
from a class template specified in [[rand.adapt]](rand.adapt "29.5.5 Random number engine adaptor class templates") meets the requirements
of a [random number engine adaptor](rand.req.adapt "29.5.3.5 Random number engine adaptor requirements [rand.req.adapt]") type[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L3399)

Except where specified otherwise,
the complexity of each function
specified in [[rand.adapt]](rand.adapt "29.5.5 Random number engine adaptor class templates") is constant[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L3405)

Except where specified otherwise,
no function described in [[rand.adapt]](rand.adapt "29.5.5 Random number engine adaptor class templates") throws an exception[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L3410)

Every function described in [[rand.adapt]](rand.adapt "29.5.5 Random number engine adaptor class templates") that has a function parameter q of type Sseq& for a template type parameter named Sseq that is different from type seed_seq throws what and when the invocation of q.generate throws[.](#4.sentence-1)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L3417)

Descriptions are provided in [[rand.adapt]](rand.adapt "29.5.5 Random number engine adaptor class templates") only for adaptor operations
that are not described in subclause [[rand.req.adapt]](rand.req.adapt "29.5.3.5 Random number engine adaptor requirements") or for operations where there is additional semantic information[.](#5.sentence-1)

In particular,
declarations for copy constructors,
for copy assignment operators,
for streaming operators,
and for equality and inequality operators
are not shown in the synopses[.](#5.sentence-2)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L3429)

Each template specified in [[rand.adapt]](rand.adapt "29.5.5 Random number engine adaptor class templates") requires one or more relationships,
involving the value(s) of its constant template parameter(s), to hold[.](#6.sentence-1)

A program instantiating any of these templates
is ill-formed
if any such required relationship fails to hold[.](#6.sentence-2)
