This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14946] New: Inclusion of <ext/hash_map> breaks calls to std::transform
- From: "andyw at imsa dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Apr 2004 21:35:45 -0000
- Subject: [Bug c++/14946] New: Inclusion of <ext/hash_map> breaks calls to std::transform
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
// Time-stamp: <2004-04-14 00:22:21 andyw>
// Copyright (C) 2004 Andreas Warkentin
//
// This program 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 of the License, or
// (at your option) any later version.
//
// This program 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 program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// <> gcc -v
// Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.3/specs
// Configured with: ../gcc-3.3.3/configure --prefix=/usr
// --enable-shared --enable-threads=posix --enable-__cxa_atexit
// --disable-checking --with-gnu-ld --verbose
// --target=i486-slackware-linux --host=i486-slackware-linux
// Thread model: posix
// gcc version 3.3.3
// Bug is also exhibited in 3.3.2 (with same host/target triplets)
#include <cctype>
#include <string>
#include <algorithm>
#include <ext/hash_map>
// INCLUSION OF ABOVE HEADERFILE BREAKS COMPILATION WITH THE FOLLOWING
// ERROR (REMOVING THE INCLUDE 'FIXES' the problem but I cant use hash_map) -
//g++ bug.cpp -o bug
//bug.cpp: In function `int main()':
//bug.cpp:50: error: no matching function for call to `transform(
// __gnu_cxx::__normal_iterator<char*, std::basic_string<char,
// std::char_traits<char>, std::allocator<char> > >,
// __gnu_cxx::__normal_iterator<char*, std::basic_string<char,
// std::char_traits<char>, std::allocator<char> > >,
// __gnu_cxx::__normal_iterator<char*, std::basic_string<char,
// std::char_traits<char>, std::allocator<char> > >, <unknown type>)'
//make: *** [bug] Error 1
int main()
{
std::string bug = "This is a GCC BUG..";
std::transform(bug.begin(), bug.end(), bug.begin(), std::tolower);
return 1;
}
--
Summary: Inclusion of <ext/hash_map> breaks calls to
std::transform
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andyw at imsa dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 3.3.3
GCC host triplet: i486-slackware-linux
GCC target triplet: i486-slackware-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14946