public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "wyderski at ii dot uni dot wroc dot pl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/13794] New: hash_set<std::string> doesn't work
Date: Wed, 21 Jan 2004 18:33:00 -0000	[thread overview]
Message-ID: <20040121183337.13794.wyderski@ii.uni.wroc.pl> (raw)

When trying to compile the following example:

-----8<-------

#include <ext/hash_set>
#include <string>

void test() {

   __gnu_cxx::hash_set<std::string> s;
   s.insert("One");
   s.insert("Two");
   s.insert("Three");
}

-----8<-----

the compiler reports:

-----8<------

c:/djgpp/lang/cxx/3.31/ext/stlhashtable.h: In member function `size_t
   __gnu_cxx::hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey,
   _Alloc>::_M_bkt_num_key(const _Key&, long unsigned int) const [with _Val
=
   std::string, _Key = std::string, _HashFcn = __gnu_cxx::hash<std::string>,
   _ExtractKey = std::_Identity<std::string>, _EqualKey =
   std::equal_to<std::string>, _Alloc = std::allocator<std::string>]':
c:/djgpp/lang/cxx/3.31/ext/stlhashtable.h:519:   instantiated from `size_t
__gnu
_cxx::hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey,
_Alloc>::_M_bkt_nu
m(const _Val&, long unsigned int) const [with _Val = std::string, _Key =
std::st
ring, _HashFcn = __gnu_cxx::hash<std::string>, _ExtractKey =
std::_Identity<std:
:string>, _EqualKey = std::equal_to<std::string>, _Alloc =
std::allocator<std::s
tring>]'
c:/djgpp/lang/cxx/3.31/ext/stlhashtable.h:884:   instantiated from `void
__gnu_c
xx::hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey,
_Alloc>::resize(long
 unsigned int) [with _Val = std::string, _Key = std::string, _HashFcn =
__gnu_cx
x::hash<std::string>, _ExtractKey = std::_Identity<std::string>, _EqualKey =
std
::equal_to<std::string>, _Alloc = std::allocator<std::string>]'
c:/djgpp/lang/cxx/3.31/ext/stlhashtable.h:378:   instantiated from
`std::pair<__
gnu_cxx::_Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey,
_Allo
c>, bool> __gnu_cxx::hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey,
_Al
loc>::insert_unique(const _Val&) [with _Val = std::string, _Key =
std::string, _
HashFcn = __gnu_cxx::hash<std::string>, _ExtractKey =
std::_Identity<std::string
>, _EqualKey = std::equal_to<std::string>, _Alloc =
std::allocator<std::string>]
'
c:/djgpp/lang/cxx/3.31/ext/hash_set:175:   instantiated from
`std::pair<typename
 __gnu_cxx::hashtable<_Value, _Value, _HashFcn, std::_Identity<_Value>,
_EqualKe
y, _Alloc>::const_iterator, bool> __gnu_cxx::hash_set<_Value, _HashFcn,
_EqualKe
y, _Alloc>::insert(typename __gnu_cxx::hashtable<_Value, _Value, _HashFcn,
std::
_Identity<_Value>, _EqualKey, _Alloc>::value_type&) [with _Value =
std::string,
_HashFcn = __gnu_cxx::hash<std::string>, _EqualKey =
std::equal_to<std::string>,
 _Alloc = std::allocator<std::string>]'
AST.cpp:159:   instantiated from here
c:/djgpp/lang/cxx/3.31/ext/stlhashtable.h:514: error: no match for call to
`(
   const __gnu_cxx::hash<std::string>) (const std::basic_string<char,
   std::char_traits<char>, std::allocator<char> >&)'
make.exe: *** [AST.o] Error 1

--------- 8< --------

-- 
           Summary: hash_set<std::string> doesn't work
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wyderski at ii dot uni dot wroc dot pl
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: IA-32, Windows XP
GCC target triplet: IA-32, MS-DOS


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13794


             reply	other threads:[~2004-01-21 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-21 18:33 wyderski at ii dot uni dot wroc dot pl [this message]
2004-01-21 19:48 ` [Bug libstdc++/13794] " bangerth at dealii dot org
2004-01-21 20:45 ` pcarlini at suse dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040121183337.13794.wyderski@ii.uni.wroc.pl \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).