Code completion still acknowledges macro after undef

Viewed 268

I have a bunch of macros defined that only serve a purpose within a small area of a project. I want to undefine them so that they don't pollute the global namespace, but Visual Studio still acknowledges their presence after #undef in other files. IE:

//A.hpp

#define A_MACRO

...

//~A.hpp

#undef A_MACRO

...

//B.hpp

#include "A.hpp"

#include "~A.hpp"

...

//main.cpp

#include "B.hpp"

A_MACRO // <- code completion recognizes this despite it being undefined
        // and invalid

Do I just have to deal with this, or is there another way to accomplish what I'm trying to do?

EDIT: It seems Code::Blocks properly erases it beyond #undef, so it has to be something within Visual Studio's settings.

1 Answers
Related