This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

### 506. Requirements of Distribution parameter for variate_generator

Section: 28.5 [rand], 99 [tr.rand.var] Status: NAD Submitter: Walter Brown Opened: 2005-07-03 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [rand].

View all issues with NAD status.

Discussion:

Paragraph 3 requires that template argument U (which corresponds to template parameter Engine) satisfy all uniform random number generator requirements. However, there is no analogous requirement regarding the template argument that corresponds to template parameter Distribution. We believe there should be, and that it should require that this template argument satisfy all random distribution requirements.

Proposed resolution:

Consequence 1: Remove the precondition clauses [tr.rand.var]/16 and /18.

Consequence 2: Add max() and min() functions to those distributions that do not already have them.

[ Mont Tremblant: Jens reccommends NAD, min/max not needed everywhere. Marc supports having min and max to satisfy generic programming interface. ]

Rationale:

Berlin: N1932 makes this moot: variate_generator has been eliminated.