Trying to have the following usage; however, gcc is not liking.
#include <boost/smart_ptr.hpp>
namespace xyz {
class elem {
public:
typedef boost::shared_ptr<elem> elem_sptr;
};
}
#include <map>
namespace abc {
template <typename ObjectType>
class BaseContainer
{
typedef std::map<int, ObjectType::elem_sptr> Container;
// tried this too
//typedef std::map<int, boost::shared_ptr<ObjectType> > Container;
typedef Container::iterator iterator;
Container c;
};
}
void main()
{
abc::BaseContainer<xyz::elem> elem_container;
}
Any thoughts on the usage?
Thanks
Venkat
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]