Boost logo

Boost Users :

From: Surya Kiran Gullapalli (suryakiran.gullapalli_at_[hidden])
Date: 2008-05-10 13:35:35


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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net