===================================================================
@@ -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
===================================================================
@@ -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);
+}
===================================================================
@@ -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 }