random numbers in bulk
Ulrich Drepper
drepper@gmail.com
Sun Aug 26 13:08:00 GMT 2012
On Sun, Aug 26, 2012 at 7:20 AM, Ulrich Drepper <drepper@gmail.com> wrote:
> What I could imagine working is that the iterator fill/generate_n
> functions are defined and in addition the special versions which use
> pointers of the result_type of the distribution.
How about the following? This version adds one more version of the
fill() function which takes result_type pointers. All these functions
have a default definition which simply falls back to the iterator
version. Specializations can overload the new variant of the function
and it all works without modifying anything in the class definition.
As far as possible specification is concerned, only the iterator
versions would have to be specified. The new interface is a
transparently added implementation detail.
If people agree this is acceptable and the consensus is that
generate_n() is the better name I can submit a patch so that the
remaining <random> work can be submitted. Still ways to go...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QQ2
Type: application/octet-stream
Size: 49444 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20120826/67f8e534/attachment.obj>
More information about the Libstdc++
mailing list