diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2009-06-21 00:57:56 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2009-06-21 00:57:56 +0000 |
commit | 1a9e603e52516fa30d1f7aca85ba056ac1c6e300 (patch) | |
tree | 7eb56d86fc1cb7fef5e09822ad09867331dd03b3 /libstdc++-v3 | |
parent | 299dd728642851701cc66891aa38766b54b288f2 (diff) | |
download | gcc-1a9e603e52516fa30d1f7aca85ba056ac1c6e300.zip gcc-1a9e603e52516fa30d1f7aca85ba056ac1c6e300.tar.gz gcc-1a9e603e52516fa30d1f7aca85ba056ac1c6e300.tar.bz2 |
2009-06-20 Paolo Carlini <paolo.carlini@oracle.com>
* Revert last Change.
From-SVN: r148756
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_iterator_base_funcs.h | 8 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/24_iterators/operations/40497.cc | 41 |
3 files changed, 8 insertions, 45 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4ab36ce..8e72774 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2009-06-20 Paolo Carlini <paolo.carlini@oracle.com> + * Revert last Change. + +2009-06-20 Paolo Carlini <paolo.carlini@oracle.com> + PR libstdc++/40497 * include/bits/stl_iterator_base_funcs.h (next, prev): Fix the signature per the current C++1x draft (N2857). diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h index 88ea829..0a854fa 100644 --- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h +++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h @@ -175,8 +175,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #ifdef __GXX_EXPERIMENTAL_CXX0X__ template<typename _InputIterator> inline _InputIterator - next(_InputIterator __x, - typename _InputIterator::difference_type __n = 1) + next(_InputIterator __x, typename + iterator_traits<_InputIterator>::difference_type __n = 1) { std::advance(__x, __n); return __x; @@ -184,8 +184,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template<typename _BidirectionalIterator> inline _BidirectionalIterator - prev(_BidirectionalIterator __x, - typename _BidirectionalIterator::difference_type __n = 1) + prev(_BidirectionalIterator __x, typename + iterator_traits<_BidirectionalIterator>::difference_type __n = 1) { std::advance(__x, -__n); return __x; diff --git a/libstdc++-v3/testsuite/24_iterators/operations/40497.cc b/libstdc++-v3/testsuite/24_iterators/operations/40497.cc deleted file mode 100644 index 8b476b2..0000000 --- a/libstdc++-v3/testsuite/24_iterators/operations/40497.cc +++ /dev/null @@ -1,41 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } - -// Copyright (C) 2009 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/>. - -namespace X -{ - class C { }; - - template<class T> void next(T) { } - template<class T> void prev(T) { } -} - -using namespace X; - -#include <string> - -using namespace std; - -// libstdc++/40497 -void test01() -{ - C c; - next(c); - prev(c); -} |