diff --git a/source/numerics.tex b/source/numerics.tex index 31a2e217d6..5858279565 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1558,62 +1558,56 @@ \pnum Throughout \ref{rand}, -the effect of instantiating a template: +where the template parameters are not constrained, +the names of template parameters are used to express type requirements +on an instantiated template $T$: \begin{itemize} \item - that has a template type parameter + If \tcode{T} has a template type parameter named + \tcode{Sseq}, \tcode{URBG}, \tcode{Engine}, + \tcode{RealType}, \tcode{IntType}, or \tcode{UIntType}, + the program is ill-formed if the corresponding template argument is cv-qualified. + \item + A template argument corresponding to a template parameter named \tcode{Sseq} - is undefined unless the corresponding template argument - is cv-unqualified and - meets the requirements + shall meet the requirements of seed sequence\iref{rand.req.seedseq}. \item - that has a template type parameter + A template argument corresponding to a template parameter named \tcode{URBG} - is undefined unless the corresponding template argument - is cv-unqualified and - meets the requirements + shall meet the requirements of uniform random bit generator\iref{rand.req.urng}. \item - that has a template type parameter + A template argument corresponding to a template parameter named \tcode{Engine} - is undefined unless the corresponding template argument - is cv-unqualified and - meets the requirements + shall meet the requirements of random number engine\iref{rand.req.eng}. \item - that has a template type parameter + If a template argument corresponding to a template parameter named \tcode{RealType} - is undefined unless the corresponding template argument - is cv-unqualified and - is one of - \tcode{float}, \tcode{double}, or \tcode{long double}. + is neither + a standard floating-point type ([basic.fundamental]) nor + a member of an implementation-defined subset of extended floating-point types, + the program is ill-formed. \item - that has a template type parameter + If a template argument corresponding to a template parameter named \tcode{IntType} - is undefined unless the corresponding template argument - is cv-unqualified and - is one of - \tcode{short}, - \tcode{int}, - \tcode{long}, - \tcode{long long}, - \tcode{unsigned short}, - \tcode{unsigned int}, - \tcode{unsigned long}, - or - \tcode{unsigned long long}. + is neither + a standard signed nor a standard unsigned integer type\iref{basic.fundamental}, nor + an extended integer type whose width is + greater or equal to that of \tcode{char} and + less than or equal to that of \tcode{long long}, nor + a member of an implementation-defined subset of integer types, + the program is ill-formed. \item - that has a template type parameter + If a template argument corresponding to a template parameter named \tcode{UIntType} - is undefined unless the corresponding template argument - is cv-unqualified and - is one of - \tcode{unsigned short}, - \tcode{unsigned int}, - \tcode{unsigned long}, - or - \tcode{unsigned long long}. + is neither + a standard or extended unsigned integer type whose width is + greater or equal to that of \tcode{short} and + less than or equal to that of \tcode{long long}, nor + a member of an implementation-defined subset of unsigned integer types, + the program is ill-formed. \end{itemize} \pnum