This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++] Problems with hash_set (patch included)


Benjamin, Mark, all,

as the "maintainer" of the excision work which moved the extensions to 
the standard to the separate __gnu_cxx namespace, after further testing 
I'm committing to the mainline the below, which fixes a /serious/ 
regression: essentially, ext/hash_set did'nt compile anymore :-(

Mark, is it ok for the branch too?

Thanks,
Paolo.

/////////////////////////

2002-04-28  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        * include/ext/stl_hashtable.h: Import __iterator_category.

2002-04-28  Paolo Carlini  <pcarlini@unitus.it>
            Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        * testsuite/ext/hash_set.cc: New testfile.

diff -urN libstdc++-v3-orig/include/ext/stl_hashtable.h 
libstdc++-v3/include/ext/stl_hashtable.h
--- libstdc++-v3-orig/include/ext/stl_hashtable.h    2002-01-28 
23:13:09.000000000 +0100
+++ libstdc++-v3/include/ext/stl_hashtable.h    2002-04-28 
17:11:10.000000000 +0200
@@ -86,6 +86,7 @@
 using std::distance;
 using std::vector;
 using std::pair;
+using std::__iterator_category;
 
 template <class _Val>
 struct _Hashtable_node
diff -urN libstdc++-v3-orig/testsuite/ext/hash_set.cc 
libstdc++-v3/testsuite/ext/hash_set.cc
--- libstdc++-v3-orig/testsuite/ext/hash_set.cc    1970-01-01 
01:00:00.000000000 +0100
+++ libstdc++-v3/testsuite/ext/hash_set.cc    2002-04-28 
17:20:22.000000000 +0200
@@ -0,0 +1,39 @@
+// 2002-04-28  Paolo Carlini  <pcarlini@unitus.it>
+//             Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>
+
+// Copyright (C) 2002 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// hash_set (SGI extension)
+
+#include <ext/hash_set>
+
+void
+test01()
+{
+  bool test = true;
+  const int werte[] = { 1, 25, 9, 16, -36};
+  const int anzahl = sizeof(werte) / sizeof(int);
+  __gnu_cxx::hash_set<int> intTable(werte, werte + anzahl);
+}
+
+int main()
+{
+  test01();
+  return 0;
+}




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]