Proof-of-Concept Implementation of D0205

Moritz Klammler
Wed Feb 10 19:07:00 GMT 2016

I have implemented my proposal D0205 to allow seeding random number
engines directly with `std::random_device` as in

    std::random_device device {};
    std::mt19937 engine {device};  // note: device passed by-reference
    std::cout << "Here is a very random number: " << engine() << "\n";

for libstdc++.  The paper will be officially submitted to ISO tomorrow
and hopefully be discussed in Jacksonville and ideally accepted for
C++17.  Attached is my patch against libstdc++ SVN revision 233225 and a
quick note how to use it.  You can find the current version of any of
these as well as the final D0205R1 of the paper on my website, too.

I would be very grateful for a review of my patch.  This is my first
experience with writing standard library code.  By the way, I don't
know how to make the ABI compatibility check pass again, even though
I've read the [ABI Policy and

I didn't include a copyright notice in the files because I didn't want
to say that something is by the FSF without being asked to do so.  I
will be happy to fix this once asked for.

Do you have any interest in incorporating this patch into libstdc++?  Is
there a process for merging experimental features that are not
officially standard yet?

Thank you for considering.

Public Key:
Fingerprint:  2732 DA32 C8D0 EEEC A081  BE9D CF6C 5166 F393 A9C0

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: INFO
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: current_patch.diff
Type: text/x-diff
Size: 17913 bytes
Desc: Patch against SVN revision 233225 to implement D0205R1 in libstdc++
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <>

More information about the Libstdc++ mailing list