This is the mail archive of the libstdc++@sources.redhat.com 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]

bits/std_cctype.h namespace problem


It appears that the global namespace is still being polluted even while
using -fhonor-std with <cctype> (using cvs gcc):

#include <cctype>
#include <iostream>

using namespace std;

int main(){
  cout << isdigit('0') << endl;
  return 0;
}

[ericb@demi tmp]$ /home/ericb/gcc/bin/c++ -v                  
Reading specs from /home/ericb/gcc/lib/gcc-lib/i686-pc-linux/2.96/specs
gcc version 2.96 20000822 (experimental)
[ericb@demi tmp]$ /home/ericb/gcc/bin/c++ -fhonor-std test.cpp
test.cpp: In function `int main ()':
test.cpp:7: call of overloaded `isdigit (char)' is ambiguous
/usr/include/ctype.h:94: candidates are: int isdigit (int)
/home/ericb/gcc/include/g++-v3/bits/std_cctype.h:150:                
int std::isdigit (int)

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