From: Paolo Carlini Date: Tue, 30 Aug 2011 15:34:50 +0000 (+0000) Subject: stl_iterator.h (make_move_iterator): Implement DR2061. X-Git-Tag: releases/gcc-4.7.0~4094 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6717379621288e10cbb2bb6b440947adcabd9cb;p=thirdparty%2Fgcc.git stl_iterator.h (make_move_iterator): Implement DR2061. 2011-08-30 Paolo Carlini * 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. From-SVN: r178330 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d125509d7c2d..dac79834adcb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2011-08-30 Paolo Carlini + + * 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 * config/os/mingw32/error_constants.h: Fix commas. diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index 6c82c5c3d1f1..624ae64c0ced 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 inline move_iterator<_Iterator> - make_move_iterator(const _Iterator& __i) + make_move_iterator(_Iterator __i) { return move_iterator<_Iterator>(__i); } template. + +#include + +// DR 2061 +void test01() +{ + int a[] = { 1, 2, 3, 4 }; + std::make_move_iterator(a + 4); + std::make_move_iterator(a); +}