|
1558 | 1558 |
|
1559 | 1559 | \pnum |
1560 | 1560 | Throughout \ref{rand}, |
1561 | | -the effect of instantiating a template: |
| 1561 | +where the template parameters are not constrained, |
| 1562 | +the names of template parameters are used to express type requirements |
| 1563 | +on an instantiated template $T$: |
1562 | 1564 | \begin{itemize} |
1563 | 1565 | \item |
1564 | | - that has a template type parameter |
| 1566 | + If \tcode{T} has a template type parameter named |
| 1567 | + \tcode{Sseq}, \tcode{URBG}, \tcode{Engine}, |
| 1568 | + \tcode{RealType}, \tcode{IntType}, or \tcode{UIntType}, |
| 1569 | + the program is ill-formed if the corresponding template argument is cv-qualified. |
| 1570 | + \item |
| 1571 | + A template argument corresponding to a template parameter |
1565 | 1572 | named \tcode{Sseq} |
1566 | | - is undefined unless the corresponding template argument |
1567 | | - is cv-unqualified and |
1568 | | - meets the requirements |
| 1573 | + shall meet the requirements |
1569 | 1574 | of seed sequence\iref{rand.req.seedseq}. |
1570 | 1575 | \item |
1571 | | - that has a template type parameter |
| 1576 | + A template argument corresponding to a template parameter |
1572 | 1577 | named \tcode{URBG} |
1573 | | - is undefined unless the corresponding template argument |
1574 | | - is cv-unqualified and |
1575 | | - meets the requirements |
| 1578 | + shall meet the requirements |
1576 | 1579 | of uniform random bit generator\iref{rand.req.urng}. |
1577 | 1580 | \item |
1578 | | - that has a template type parameter |
| 1581 | + A template argument corresponding to a template parameter |
1579 | 1582 | named \tcode{Engine} |
1580 | | - is undefined unless the corresponding template argument |
1581 | | - is cv-unqualified and |
1582 | | - meets the requirements |
| 1583 | + shall meet the requirements |
1583 | 1584 | of random number engine\iref{rand.req.eng}. |
1584 | 1585 | \item |
1585 | | - that has a template type parameter |
| 1586 | + If a template argument corresponding to a template parameter |
1586 | 1587 | named \tcode{RealType} |
1587 | | - is undefined unless the corresponding template argument |
1588 | | - is cv-unqualified and |
1589 | | - is one of |
1590 | | - \tcode{float}, \tcode{double}, or \tcode{long double}. |
| 1588 | + is neither |
| 1589 | + a standard floating-point type ([basic.fundamental]) nor |
| 1590 | + a member of an implementation-defined subset of extended floating-point types, |
| 1591 | + the program is ill-formed. |
1591 | 1592 | \item |
1592 | | - that has a template type parameter |
| 1593 | + If a template argument corresponding to a template parameter |
1593 | 1594 | named \tcode{IntType} |
1594 | | - is undefined unless the corresponding template argument |
1595 | | - is cv-unqualified and |
1596 | | - is one of |
1597 | | - \tcode{short}, |
1598 | | - \tcode{int}, |
1599 | | - \tcode{long}, |
1600 | | - \tcode{long long}, |
1601 | | - \tcode{unsigned short}, |
1602 | | - \tcode{unsigned int}, |
1603 | | - \tcode{unsigned long}, |
1604 | | - or |
1605 | | - \tcode{unsigned long long}. |
| 1595 | + is neither |
| 1596 | + a standard signed nor a standard unsigned integer type\iref{basic.fundamental}, nor |
| 1597 | + an extended integer type whose width is |
| 1598 | + greater or equal to that of \tcode{char} and |
| 1599 | + less than or equal to that of \tcode{long long}, nor |
| 1600 | + a member of an implementation-defined subset of integer types, |
| 1601 | + the program is ill-formed. |
1606 | 1602 | \item |
1607 | | - that has a template type parameter |
| 1603 | + If a template argument corresponding to a template parameter |
1608 | 1604 | named \tcode{UIntType} |
1609 | | - is undefined unless the corresponding template argument |
1610 | | - is cv-unqualified and |
1611 | | - is one of |
1612 | | - \tcode{unsigned short}, |
1613 | | - \tcode{unsigned int}, |
1614 | | - \tcode{unsigned long}, |
1615 | | - or |
1616 | | - \tcode{unsigned long long}. |
| 1605 | + is neither |
| 1606 | + a standard or extended unsigned integer type whose width is |
| 1607 | + greater or equal to that of \tcode{short} and |
| 1608 | + less than or equal to that of \tcode{long long}, nor |
| 1609 | + a member of an implementation-defined subset of unsigned integer types, |
| 1610 | + the program is ill-formed. |
1617 | 1611 | \end{itemize} |
1618 | 1612 |
|
1619 | 1613 | \pnum |
|
0 commit comments