inheritance and shared_ptr

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

inheritance and shared_ptr

Pierre Salmon
  Hello,
  I have a question with the behaviour of luabind in tthis example :

class A {...}
class B : public A {...}

luabind::scope Register () {
    return class_<A, boost::shared_ptr<A> >("A"),
             class_<B, bases<A, boost::shared_ptr<B> > >("B") ;
}


Is it possible, in this state, to get a pointer with type
boost::shared_ptr<A> pointing to an instance of class B ? Or you must
define all element of inheritance in declaration of class B :
In this case :
  class_<B, bases<A, boost::shared_ptr<B>, boost::shared_ptr<A> > >("B") ;

Thank

Sorry for my english, it is not very good

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user