This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Test standard function names?


On Mon, 16 Sep 2002, Kevin Handy wrote:

> I was thinking C mostly. C++, maybe, but with it's polymorphic
> functions would make things a lot harder.

There are other problems with C++. First, I can define something named min
or ifstream or cout or whatever, as long as I do it inside something other
than std:: (or the global namespace, if "using namespace std" is in
effect). I really don't know the exact language rules about this, you may
well be able to define something named ifstream even if you're also using
the std:: namespace.

Also, sometimes it's perfectly legitimate and useful to do something like
specialize a C++ template function inside a namespace std block. For
example providing an optimized version of std::swap for an object that
you've created.

-Jack


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