# Declaration in Scope of Function Defined in a Namespace

In accordance with the C++ language specification, if a function declaration is encountered within a function definition, the function referenced is taken to be another member of the namespace of the containing function; regardless of whether the containing function definition is lexically within a namespace definition. The Microsoft* Visual C++* compiler takes the referenced function to be a global function (not in any namespace).

Functions declared in global or namespace scopes are interpreted the same way by both the Intel® C++ Compiler and the Microsoft* Visual C++* compiler.

Parent topic: Microsoft* Compatibility