655. Signature of generate_canonical not useful

Section: [rand.util.canonical] Status: CD1 Submitter: Daniel Krügler Opened: 2007-03-08 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [rand.util.canonical].

View all issues with CD1 status.


In 29.6.2 [rand.synopsis] we have the declaration

template<class RealType, class UniformRandomNumberGenerator,
  size_t bits>
result_type generate_canonical(UniformRandomNumberGenerator& g);

Besides the "result_type" issue (already recognized by Bo Persson at Sun, 11 Feb 2007 05:26:47 GMT in this group) it's clear, that the template parameter order is not reasonably choosen: Obviously one always needs to specify all three parameters, although usually only two are required, namely the result type RealType and the wanted bits, because UniformRandomNumberGenerator can usually be deduced.

See N2391 and N2423 for some further discussion.

Proposed resolution:

Adopt the proposed resolution in N2423.

[ Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue. The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona. ]