In message <[EMAIL PROTECTED]>, Ossama Othman writes:
>> Just noticed a problem with this. If you compile it with:
>>
>> gcc -o test test.cc
>
>Right, I noticed that too. Hopefully `gcc' won't be part of the
>C++ compiler search list, unless there is good reason for it.
It shouldn't be in the default list (though "CC" might pick up a
cc.exe which might be gcc).
>Note that <iostream> still isn't supported by some C++ compilers.
><iostream.h> would have to be used.
OK. I wasn't proposing this as a test, just giving an example of the
problem.
>It is for these reasons why I didn't include any library functions in
>the simple test I posted. My goal for the test was to use C++
>features that all C++ compilers should support (base member
>initialization, virtual functions and a "this" pointer), that didn't
>rely on anything external, such as a library. Unfortunately, I can't
>think of any better tests or ideas either; at least not at the
>moment. :-)
>
>Thoughts? Disagreements?
What you're saying seems sensible to me.
Perhaps two macro variants (or a switch) would be useful. The
majority of C++ projects are likely to prefer a compiler with a
working standard library, but as you point out not all will.
That still leaves the namespace issues unresolved though. I guess
people use an autoconf test to find out what (if anything) is needed
to get the standard library to work without use "std::" explicitly, so
perhaps we would have to probe it.
Cheers,
Olly