This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: STL std::random_shuffle behavior fails with lrand48 (workaround)
- From: Jacek Trzmiel <sc0rp at hot dot pl>
- To: cygwin at cygwin dot com
- Date: Tue, 03 Aug 2004 10:15:00 +0200
- Subject: Re: STL std::random_shuffle behavior fails with lrand48 (workaround)
- References: <410AEF64.90409@kleckner.net> <410B038D.5010507@isonews2.com> <410EB9A2.5020701@kleckner.net>
> If someone else could demonstrate that
> the bug exists on other platforms, I would
> be grateful.
I've compiled and run code from:
http://cygwin.com/ml/cygwin/2004-07/msg01118.html
on Cygwin and FreeBSD machine:
cygwin1.dll snapshot 20040720-12:03:09:
$ g++ --version
g++ (GCC) 3.3.1 (cygming special)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ g++ -o lr lr.cpp
$ ./lr
changes before:
0 1 2 3 4 5 6
changes after:
6 0 1 2 3 4 5
changes after:
5 6 0 1 2 3 4
changes after:
4 5 6 0 1 2 3
FreeBSD 5.2:
$ g++ --version
g++ (GCC) 3.3.3 [FreeBSD] 20031106
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ g++ -o lr lr.cpp
$ ./lr
changes before:
0 1 2 3 4 5 6
changes after:
1 5 6 4 3 2 0
changes after:
5 3 0 4 2 1 6
changes after:
1 6 4 5 0 3 2
Regards,
Jacek.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/