Thanks Jeff, but I guess it is this stupid MSVC compiler. I just done what I does not want to do (but it works fine), turning using namespace directive into scope resolution operator inside "token_functions.hpp": bool is_ret(Char E)const { if(returnable_.length()) return returnable_.find(E) != string_type::npos; else{ if(no_ispunct_){return false;} else{ //using namespace std; //int r = ispunct(E); int r = std::ispunct(E); return r != 0; } } } bool is_nonret(Char E)const { if(nonreturnable_.length()) return nonreturnable_.find(E) != string_type::npos; else{ if(no_isspace_){return false;} else{ //using namespace std; //int r = isspace(E); int r = std::isspace(E); return r != 0; } } } I try this little program inside MSVC and it work fine. I does not understand what is going on inside "token_functions.hpp"! #include <string> #include <iostream> void f(); int main(int argc, char* argv[]) { f(); return 0; } #define xxx std; void f() { using namespace xxx; string a; a.assign("hello"); cout << a << endl; }