Hi, tested x86_64-linux, committed.
Paolo. ///////////////////////
2011-08-30 Paolo Carlini <paolo.carl...@oracle.com> * include/bits/stl_iterator.h (make_move_iterator): Implement DR2061. * testsuite/24_iterators/move_iterator/dr2061.cc: New. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning line numbers.
Index: include/bits/stl_iterator.h =================================================================== --- include/bits/stl_iterator.h (revision 178320) +++ include/bits/stl_iterator.h (working copy) @@ -1,6 +1,7 @@ // Iterators -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +// 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -1115,7 +1116,7 @@ template<typename _Iterator> inline move_iterator<_Iterator> - make_move_iterator(const _Iterator& __i) + make_move_iterator(_Iterator __i) { return move_iterator<_Iterator>(__i); } template<typename _Iterator, typename _ReturnType Index: testsuite/24_iterators/move_iterator/dr2061.cc =================================================================== --- testsuite/24_iterators/move_iterator/dr2061.cc (revision 0) +++ testsuite/24_iterators/move_iterator/dr2061.cc (revision 0) @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <iterator> + +// DR 2061 +void test01() +{ + int a[] = { 1, 2, 3, 4 }; + std::make_move_iterator(a + 4); + std::make_move_iterator(a); +} Index: testsuite/20_util/weak_ptr/comparison/cmp_neg.cc =================================================================== --- testsuite/20_util/weak_ptr/comparison/cmp_neg.cc (revision 178320) +++ testsuite/20_util/weak_ptr/comparison/cmp_neg.cc (working copy) @@ -52,8 +52,8 @@ // { dg-warning "note" "" { target *-*-* } 479 } // { dg-warning "note" "" { target *-*-* } 468 } // { dg-warning "note" "" { target *-*-* } 829 } -// { dg-warning "note" "" { target *-*-* } 1055 } -// { dg-warning "note" "" { target *-*-* } 1049 } -// { dg-warning "note" "" { target *-*-* } 341 } -// { dg-warning "note" "" { target *-*-* } 291 } +// { dg-warning "note" "" { target *-*-* } 1056 } +// { dg-warning "note" "" { target *-*-* } 1050 } +// { dg-warning "note" "" { target *-*-* } 342 } +// { dg-warning "note" "" { target *-*-* } 292 } // { dg-warning "note" "" { target *-*-* } 224 }