aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/bits/stl_iterator.h5
-rw-r--r--libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc8
-rw-r--r--libstdc++-v3/testsuite/24_iterators/move_iterator/dr2061.cc29
4 files changed, 43 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index d125509..dac7983 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,12 @@
2011-08-30 Paolo Carlini <paolo.carlini@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.
+
+2011-08-30 Paolo Carlini <paolo.carlini@oracle.com>
+
* config/os/mingw32/error_constants.h: Fix commas.
2011-08-29 Benjamin Kosnik <bkoz@redhat.com>
diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h
index 6c82c5c..624ae64 100644
--- a/libstdc++-v3/include/bits/stl_iterator.h
+++ b/libstdc++-v3/include/bits/stl_iterator.h
@@ -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 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
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
diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
index b192c65..d007c5a 100644
--- a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
@@ -52,8 +52,8 @@ main()
// { 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 }
diff --git a/libstdc++-v3/testsuite/24_iterators/move_iterator/dr2061.cc b/libstdc++-v3/testsuite/24_iterators/move_iterator/dr2061.cc
new file mode 100644
index 0000000..8bec8ef
--- /dev/null
+++ b/libstdc++-v3/testsuite/24_iterators/move_iterator/dr2061.cc
@@ -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);
+}