For switching between different implementations of an interface I am using namespaces like this:
#ifdef NEW_VERSION
namespace new_version_namespace
#else
namespace old_version_namespace
#endif
{
int Foo();
void Bar();
}
#ifdef NEW_VERSION
using namespace new_version_namespace;
#else
using namespace old_version_namespace;
#endif
I have two different implementation files that I include in the project, but only the implementations of one of the namespaces will be used, depending on the define.
Unfortunately, VAX doesn't recognice the symbol new_version_namespace, regardless on whether or not the macro symbol NEW_VERSION is defined or not (not even when I place a #define right on top of the namespace definition). It's always underlined with a red wriggly line. If I use the namespace symbol though, and append a '::', I get prompted with a listbox of symbols defined in the namespace, so after all VA *does* know the symbol, it just pretends to not know it ....