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

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 768195 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 10/21/2012 11:50:56 AM
Access Restriction Public

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();
		}
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.