Okay,
I should have been more clearer in my question.
Lets say I've these files.
global.hpp
main.cpp
someother.cpp
myclass.hpp.
global.hpp has a member variable declared like this. (my global.hpp has static members and static variables every where and nothing else)
static map<string, myclass> myMap ;
Now my main function includes global.hpp, but is not dependent on myclass. If i include myclass.hpp in global.hpp, I'd end up compiling main.cpp when ever myclass.hpp is changed. To avoid this, I forward declare myclass in global.hpp (with out including myclass.hpp)
my someother.cpp includes global.hpp and is dependent on myclass as well, so includes myclass.hpp as well.
So what i'm asking is just forward declaring myclass in global.hpp will not cause any problem for me, when I'm working with standard containers like map, set etc. But that is not the case for bimap.
And the above said problem was with VS2005 and GCC-4.2 compilers on windows and linux respectively.
Thanks in advance,
Surya