
Surya Kiran Gullapalli wrote:
With the standard c++ containers, I can always use forward declaration of my classes in the interface files (header files) and then include the appropriate header files in the implementation files (source files).
With boost bimap this seems to be not possible. Lets say I've MyClass and I do like this.
---------------------------- class MyClass
boost::bimap
my_bimap ; -------------------------- The compiler spits out a lot of error messages. But If i avoid forward declaration and include MyClass header file before declaring boost::bimap, every thing is normal.
First of all, your MyClass forward declaration should end with a
semicolon (;), of course! Still, you're saying that the forward
declaration would be sufficient when you declare an instance of a
container from the Standard C++ Library, right? So would the following
compile on your platform?
//----------------------------
#include <map>
#include <string>
using std::string ;
class MyClass ;
std::map