From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11583 invoked by alias); 6 Apr 2010 10:54:13 -0000 Received: (qmail 11541 invoked by uid 48); 6 Apr 2010 10:53:48 -0000 Date: Tue, 06 Apr 2010 10:54:00 -0000 Message-ID: <20100406105348.11540.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/43660] range of random-number generator seems wrong/confusing In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "redi at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg00464.txt.bz2 ------- Comment #3 from redi at gcc dot gnu dot org 2010-04-06 10:53 ------- (In reply to comment #0) > > As best as I can tell, std::random_shuffle wants its random-number > generating functor to return results in the range [0,N), where N is the > parameter it passes to the functor; i.e., the upper-bound is exclusive > (and the lower-bound inclusive). http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3056.pdf changes the third random_shuffle overload to shuffle and changes the requirements -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43660