Re: Register Class Twice error
Daniel Wallin <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
On 6/21/09 5:18 PM, Stephan Jauernick wrote:
> Hi,
> Sadly i dont have the tools to generate a call graph.
> But when the function is called twice wouldnt it then complain on the
> Game Class too?(i checked it it dies always at the Entity register call.)
> Another thing if i remove the EntityPointer from this line
> luabind::class_<Entity, EntityPointer>("Entity") it works.
I'm guessing it's because your get_const_holder() overload returns the
smart pointer type unmodified:
template<class A>
SharedPointer<A>* get_const_holder(SharedPointer<A>*)
{
return 0;
}
Can you try doing this instead:
template<class A>
SharedPointer<A const>* get_const_holder(SharedPointer<A>*)
{
return 0;
}
--
Daniel Wallin
BoostPro Computing
http://www.boostpro.com
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org