Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > template depth ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 9583 of 9593
Post > Topic >>

template depth problem

by Venkat <swara101@[EMAIL PROTECTED] > May 8, 2008 at 09:30 PM

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! ]




 5 Posts in Topic:
template depth problem
Venkat <swara101@[EMAI  2008-05-08 21:30:31 
Re: template depth problem
Dan Barbus <dan.barbus  2008-05-09 09:28:36 
Re: template depth problem
David Pol <david@[EMAI  2008-05-09 09:24:25 
Re: template depth problem
ciesizdz@[EMAIL PROTECTED  2008-05-09 09:24:12 
Re: template depth problem
Francis Glassborow <fr  2008-05-09 09:23:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 19:13:37 CDT 2008.