Differences in <random> from TR1 to C++-0X
Ed Smith-Rowland
3dw4rd@verizon.net
Thu Nov 13 03:34:00 GMT 2008
Chris Fairles wrote:
> On Wed, Nov 12, 2008 at 9:31 AM, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
>
>> Greetings,
>>
>> I was looking over random both in TR1 and C++-0X and it seems, unlike most
>> other components, the differences between TR1 and std (C++-0X) for random
>> are rather significant. Classes were added, removed, and renamed.
>>
>> Unfortunately, the std (C++-0X) version still uses the old (TR1) names for
>> all
>> relevant classes.
>>
>> I would be willing to try this if no one else is working on it. (I noticed
>> some activity
>> on random that might help with some of the examples in Becker's book ;-) )
>>
>> Ed
>>
>>
>>
>
> I don't know of anyone actively working on c++0x <random> but in any
> case it looks like it might be worth separating <tr1/random> from
> c++0x's <random> (as it was done for tuple's, shared_ptr's etc).
> Actually, I take that back. There's probably very few differences (if
> any) in the implementations so I think #ifdef'ing on
> __GXX_EXPERIMENTAL_CXX0X__ will suffice.
>
> Chris
>
>
I started down the ifdef road and - even just correcting the names - it
seemed we were advancing on the "break-even" point. Then I noticed
additions and changes to the template arguments for
mersenne_twister_engine and subtract_with_carry_engine. There are also
parameter accessors in the uniform distributions. I think on balance
that it would be better to split the headers for std and tr1. When all
is said and done I don't think there will be much cut & paste.
Ed
More information about the Libstdc++
mailing list