Home Dashboard Directory Help
Search

std::independent_bits_engine constructor fails to call _Init(); by kane_t


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 768195
Opened: 10/21/2012 11:50:56 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

In the constructor that takes an Engine&&, std::independent_bits_engine fails to call the _Init() function to initialise its member variables, resulting in very bad behaviour. (Namely, infinite loops.)

The constructor looks like this:
    explicit independent_bits_engine(_Engine&& _Ex)
        : _Eng(_STD forward<_Engine>(_Ex))
        {    // construct with engine initializer _Ex
        }

But it should read:
    explicit independent_bits_engine(_Engine&& _Ex)
        : _Eng(_STD forward<_Engine>(_Ex))
        {    // construct with engine initializer _Ex
        _Init();
        }
Details
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:31 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from: http://go.microsoft.com/?linkid=9832436
Posted by Microsoft on 12/17/2012 at 4:56 PM
P.S. The kittens are happy now!
Posted by Microsoft on 12/17/2012 at 4:54 PM
Hi,

Thanks for reporting this bug. We've fixed both independent_bits_engine and shuffle_order_engine. The fix will be available in the next release of our C++ Standard Library implementation.

Note: Connect doesn't notify me about comments. If you have any further questions, please E-mail me.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
stl@microsoft.com
Posted by Microsoft on 10/22/2012 at 2:02 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been reproduced and has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Sign in to post a workaround.