diff options
author | Akira Takahashi <faithandbrave@gmail.com> | 2012-09-26 23:56:39 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2012-09-26 23:56:39 +0000 |
commit | e80d3fda8ea36d81b00e5c28f53297cb206f421c (patch) | |
tree | 2a8050c1232578678eac4afb98b2d35c221380ef /libstdc++-v3 | |
parent | ef13e9de0c3b6d4abd7cfcc489a7d68fe6983f86 (diff) | |
download | gcc-e80d3fda8ea36d81b00e5c28f53297cb206f421c.zip gcc-e80d3fda8ea36d81b00e5c28f53297cb206f421c.tar.gz gcc-e80d3fda8ea36d81b00e5c28f53297cb206f421c.tar.bz2 |
re PR libstdc++/53515 (InputIterator version std::advance needs negative check)
2012-09-26 Akira Takahashi <faithandbrave@gmail.com>
PR libstdc++/53515
* include/bits/stl_iterator_base_funcs.h (__advance(_InputIterator&,
_Distance, input_iterator_tag)): Add _GLIBCXX_DEBUG_ASSERT(__n >= 0).
From-SVN: r191784
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_iterator_base_funcs.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0f6950f..b011d34 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2012-09-26 Akira Takahashi <faithandbrave@gmail.com> + + PR libstdc++/53515 + * include/bits/stl_iterator_base_funcs.h (__advance(_InputIterator&, + _Distance, input_iterator_tag)): Add _GLIBCXX_DEBUG_ASSERT(__n >= 0). + 2012-09-26 Ulrich Drepper <drepper@gmail.com> Optimize bulk mode for normal_distribution<double> for SSE3. diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h index 8028fbb..808f5d9 100644 --- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h +++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h @@ -1,7 +1,6 @@ // Functions used by iterators -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001-2012 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 @@ -63,6 +62,7 @@ #pragma GCC system_header #include <bits/concept_check.h> +#include <debug/debug.h> namespace std _GLIBCXX_VISIBILITY(default) { @@ -124,6 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) + _GLIBCXX_DEBUG_ASSERT(__n >= 0); while (__n--) ++__i; } |