This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/18808] New: iostream include makes algorithm/transform broken
- From: "kgardas at objectsecurity dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Dec 2004 12:12:38 -0000
- Subject: [Bug libstdc++/18808] New: iostream include makes algorithm/transform broken
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hello,
using gcc3.4.2, following code compiles well:
1
2 #include <cctype>
3 #include <string>
4 #include <algorithm>
5 //#include <iostream>
6
7 using namespace std;
8
9 int
10 main() {
11 string s="HeLLO";
12 transform(s.begin(), s.end(), s.begin(), tolower);
13 return 0;
14 }
15
but when I uncomment iostream include on line 5, it starts to be broken:
$ c++ str.cc
str.cc: In function `int main()':
str.cc:12: 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>)'
$
Although this code is perfectly compilable by Comeau C++ 4.3.3/Dinkumware 4.02
and Intel C++ 8.0.
Cheers,
Karel
--
Summary: iostream include makes algorithm/transform broken
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kgardas at objectsecurity dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18808