Menu

#10 simple example fails to compile without #include <iostream>

open
tvmet (5)
5
2008-11-15
2008-11-15
No

gcc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
Copyright (C) 2006 Free Software Foundation, Inc.

-------------------------

#include <tvmet/tvmet.h>
int main(int argc, char **argv) {}

g++ main.cc
/usr/include/tvmet/TvmetBase.h: In member function 'std::ostream& tvmet::IndentLevel::print_xpr(std::ostream&) const':
/usr/include/tvmet/TvmetBase.h:63: error: no match for 'operator<<' in 'os << " "'
make: *** [all] Error 1

------------------------

#include <iostream>
#include <tvmet/tvmet.h>
int main(int argc, char **argv) {}

//works fine.

Discussion


Log in to post a comment.