From 1a9e603e52516fa30d1f7aca85ba056ac1c6e300 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 21 Jun 2009 00:57:56 +0000 Subject: [PATCH] 2009-06-20 Paolo Carlini * Revert last Change. From-SVN: r148756 --- libstdc++-v3/ChangeLog | 4 ++ .../include/bits/stl_iterator_base_funcs.h | 8 ++-- .../24_iterators/operations/40497.cc | 41 ------------------- 3 files changed, 8 insertions(+), 45 deletions(-) delete mode 100644 libstdc++-v3/testsuite/24_iterators/operations/40497.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4ab36ce5028..8e7277447ca 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2009-06-20 Paolo Carlini + + * Revert last Change. + 2009-06-20 Paolo Carlini PR libstdc++/40497 diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h index 88ea8293ba6..0a854faa14c 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 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 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 8b476b29114..00000000000 --- 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 -// . - -namespace X -{ - class C { }; - - template void next(T) { } - template void prev(T) { } -} - -using namespace X; - -#include - -using namespace std; - -// libstdc++/40497 -void test01() -{ - C c; - next(c); - prev(c); -} -- 2.30.2