From patchwork Wed Aug 11 17:11:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 61491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 1FF2FB70DC for ; Thu, 12 Aug 2010 03:12:06 +1000 (EST) Received: (qmail 27532 invoked by alias); 11 Aug 2010 17:12:02 -0000 Received: (qmail 27509 invoked by uid 22791); 11 Aug 2010 17:12:00 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from vsmtp12.tin.it (HELO vsmtp12.tin.it) (212.216.176.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Aug 2010 17:11:54 +0000 Received: from [192.168.0.4] (79.52.212.149) by vsmtp12.tin.it (8.5.113) id 4BC85B970AAF59EA; Wed, 11 Aug 2010 19:11:52 +0200 Message-ID: <4C62D9D7.7050200@oracle.com> Date: Wed, 11 Aug 2010 19:11:51 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/3.0.6 Thunderbird/3.0.6 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] Resolve US 121 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, as agreed in Rapperswil. Tested x86_64-linux, committed. Paolo. ///////////////////////// 2010-08-11 Paolo Carlini * include/bits/stl_algo.h (shuffle): Change signature consistently with random_shuffle (US 121). * include/bits/algorithmfwd.h: Adjust. * testsuite/25_algorithms/shuffle/requirements/ explicit_instantiation/2.cc: Likewise. * testsuite/25_algorithms/shuffle/requirements/ explicit_instantiation/pod.cc: Likewise. Index: include/bits/stl_algo.h =================================================================== --- include/bits/stl_algo.h (revision 163100) +++ include/bits/stl_algo.h (working copy) @@ -4133,7 +4133,7 @@ typename _UniformRandomNumberGenerator> void shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, - _UniformRandomNumberGenerator& __g) + _UniformRandomNumberGenerator&& __g) { // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< Index: include/bits/algorithmfwd.h =================================================================== --- include/bits/algorithmfwd.h (revision 163100) +++ include/bits/algorithmfwd.h (working copy) @@ -521,7 +521,7 @@ #if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1) template void - shuffle(_RAIter, _RAIter, _UGenerator&); + shuffle(_RAIter, _RAIter, _UGenerator&&); #endif template Index: testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc =================================================================== --- testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc (revision 163100) +++ testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc (working copy) @@ -21,7 +21,6 @@ // with this library; see the file COPYING3. If not see // . - #include #include #include @@ -34,5 +33,5 @@ typedef value_type* iterator_type; typedef std::mt19937_64 ugenerator_type; - template void shuffle(iterator_type, iterator_type, ugenerator_type&); + template void shuffle(iterator_type, iterator_type, ugenerator_type&&); } Index: testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc =================================================================== --- testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc (revision 163100) +++ testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc (working copy) @@ -33,5 +33,5 @@ typedef value_type* iterator_type; typedef std::mt19937_64 ugenerator_type; - template void shuffle(iterator_type, iterator_type, ugenerator_type&); + template void shuffle(iterator_type, iterator_type, ugenerator_type&&); }