diff options
Diffstat (limited to 'contrib/libstdc++/include/debug/hash_set.h')
-rw-r--r-- | contrib/libstdc++/include/debug/hash_set.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/contrib/libstdc++/include/debug/hash_set.h b/contrib/libstdc++/include/debug/hash_set.h index 0f56d882935c..2d3e0b303fb6 100644 --- a/contrib/libstdc++/include/debug/hash_set.h +++ b/contrib/libstdc++/include/debug/hash_set.h @@ -1,6 +1,6 @@ // Debugging hash_set implementation -*- C++ -*- -// Copyright (C) 2003 +// Copyright (C) 2003, 2005, 2006 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, // USA. // As a special exception, you may use this file as part of a free software @@ -28,24 +28,30 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. +/** @file debug/hash_set.h + * This file is a GNU debug extension to the Standard C++ Library. + */ + #ifndef _GLIBCXX_DEBUG_HASH_SET_H #define _GLIBCXX_DEBUG_HASH_SET_H 1 #include <debug/safe_sequence.h> #include <debug/safe_iterator.h> -namespace __gnu_debug_def +namespace __gnu_cxx +{ +namespace __debug { template<typename _Value, typename _HashFcn = __gnu_cxx::hash<_Value>, typename _EqualKey = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value> > class hash_set - : public __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>, + : public _GLIBCXX_EXT::hash_set<_Value, _HashFcn, _EqualKey,_Alloc>, public __gnu_debug::_Safe_sequence<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > { - typedef __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Base; + typedef _GLIBCXX_EXT::hash_set<_Value, _HashFcn, _EqualKey,_Alloc> _Base; typedef __gnu_debug::_Safe_sequence<hash_set> _Safe_base; public: @@ -129,7 +135,14 @@ namespace __gnu_debug_def return std::make_pair(iterator(__res.first, this), __res.second); } - template <typename _InputIterator> + void + insert(const value_type* __first, const value_type* __last) + { + __glibcxx_check_valid_range(__first, __last); + _Base::insert(__first, __last); + } + + template<typename _InputIterator> void insert(_InputIterator __first, _InputIterator __last) { @@ -240,6 +253,7 @@ namespace __gnu_debug_def swap(hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x, hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y) { __x.swap(__y); } -} // namespace __gnu_debug_def +} // namespace __debug +} // namespace __gnu_cxx #endif |