This is the mail archive of the email@example.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: random_shuffle failure on B20.1?
- To: "Cygwin List" <firstname.lastname@example.org>
- Subject: Re: random_shuffle failure on B20.1?
- From: "Phil Edwards" <email@example.com>
- Date: Sat, 10 Apr 1999 16:58:12 -0800
- Organization: Deja News Mail (http://www.my-dejanews.com:80)
On Fri, 09 Apr 1999 17:26:05 Mumit Khan wrote:
>"Phil Edwards" <firstname.lastname@example.org> writes:
>> I've been doing some work under B20.1/egcs-1.1.2 using
>> -mno-cygwin, and getting errors when I try to use the
>> standard algorithm random_shuffle() (which I have
>> used before, so I know the STL code isn't completely
>> full of cheese, etc).
>Please look up the specs for random_shuffle -- it requires a
>random access iterator (hint: use deque as opposed to list).
Well, crap. First time I've ever screwed up because
of ISO noncompliance. And my cow-orkers rely on me
to tell them these things...
>Here's a patch for Mingw ... please patch the stl_config.h file located
>in the <install_root>/include/g++ directory with the following:
>--- stl_config.h.~1 Fri Apr 9 17:19:19 1999
>+++ stl_config.h Fri Apr 9 17:20:38 1999
>@@ -138,6 +138,10 @@
> # define __STL_USE_NAMESPACES
> # endif
>+# if defined(__GNUC__) && defined(__MINGW32__)
>+# define __STL_NO_DRAND48
> # if defined(_MSC_VER)
> # if _MSC_VER > 1000
> # include <yvals.h>
Patched and tested. All is well!
As always, I am in your debt. Thanks again,
-----== Sent via Deja News, The Discussion Network ==-----
http://www.dejanews.com/ Easy access to 50,000+ discussion forums
Want to unsubscribe from this list?
Send a message to email@example.com