I thought that cpp already provides a separate scope, if function declared and implemented only there and not exported, there shouldn't be any problem
How could it possibly do that? If two definitions of the same function, with identical parameters, collide in the same linkage unit, there is no way for the linker to determine which one should be used. The preprocessor has nothing to do with this problem.
Bookmarks