> It is not too difficult to add a check for this, I guess. It would be
> nice if you could give me an example of a minimal program that
> requires 'using' for std::. I could test on strings, but I'd rather
> have a more orthogonal test.

To see if the compiler supports namespace-qualification, try:

--
#include <vector>

int main() {
        std::vector<int> test;
        return 0;
}
--

To see if the compiler supports specific "using", try:

--
#include <vector>
using std::vector;

int main() {
        vector<int> test;
        return 0;
}
--

To see if the compiler supports generic "using", try:

--
#include <vector>
using namespace std;

int main() {
        vector<int> test;
        return 0;
}
--

To see if the compiler *requires* namespaces, try:

--
#include <vector>

int main() {
        typedef int vector;
        std::vector<vector> test;
        return 0;
}
--

A proper C++ compiler should be able to link and compile all of these.  Only
C++ compilers that support C++ namespaces correctly should be able to compile
the last one.

Is that enough, or do you need more?

Greets,

Asger

Reply via email to