summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/debug/map.h
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-03 20:30:28 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-03 20:30:28 +0000
commit26acfa1aa3114e9be033c7d056dca6a6f18f54b6 (patch)
tree245c4584a0dd9666c492348854833672db104618 /libstdc++-v3/include/debug/map.h
parent7a4491a4872741b9fd5dbe7127a0163c532ef966 (diff)
downloadgcc-26acfa1aa3114e9be033c7d056dca6a6f18f54b6.tar.gz
2010-01-03 Paolo Carlini <paolo.carlini@oracle.com>
* include/debug/set.h: Implement DR 130 here too. * include/debug/multiset.h: Likewise. * include/debug/map.h: Likewise. * include/debug/multimap.h: Likewise. * include/profile/set.h: Implement DR 130 fully. * include/profile/multiset.h: Likewise. * include/profile/map.h: Likewise. * include/profile/multimap.h: Likewise. * include/debug/list: Implement DR 1133 here too. * include/ext/pb_ds/detail/debug_map_base.hpp: Comment out for now uses of __gnu_cxx::throw_allocator. * testsuite/21_strings/basic_string/40160.cc: Don't pass explicitly -D_GLIBCXX_DEBUG, doesn't play well with profile-mode testing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155594 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug/map.h')
-rw-r--r--libstdc++-v3/include/debug/map.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h
index 2ac21dff5bc..9a558b59488 100644
--- a/libstdc++-v3/include/debug/map.h
+++ b/libstdc++-v3/include/debug/map.h
@@ -1,6 +1,6 @@
// Debugging map implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -228,6 +228,15 @@ namespace __debug
_Base::insert(__first, __last);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ return iterator(_Base::erase(__position.base()), this);
+ }
+#else
void
erase(iterator __position)
{
@@ -235,6 +244,7 @@ namespace __debug
__position._M_invalidate();
_Base::erase(__position.base());
}
+#endif
size_type
erase(const key_type& __x)
@@ -250,6 +260,18 @@ namespace __debug
}
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ while (__first != __last)
+ this->erase(__first++);
+ return __last;
+ }
+#else
void
erase(iterator __first, iterator __last)
{
@@ -259,6 +281,7 @@ namespace __debug
while (__first != __last)
this->erase(__first++);
}
+#endif
void
swap(map& __x)