Overloads w/shared_ptr
Stefan Schindler <[email protected]> Wed, 17 Aug 2011 10:20:00 +0200
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
Hi guys,
I'm currently having a problem with specifying a custom overload for the
following definition:
typedef boost::shared_ptr<Foobar> FoobarPtr;
void wrapped_do_something( FoobarPtr object ) {
...
}
class_<Foobar, FoobarPtr>( "Foobar" )
.def( "do_something", &wrapped_do_something )
;
Compiles fine, however when calling 'do_something' from Lua, it
complains about not finding a matching overload. The first parameter is
named "custom [N5boost10shared_ptrIN6FoobarEEE]" in the error message.
My assumption is that at the time 'wrapped_do_something' is defined with
'.def', it's not known that 'Foobar' objects are being held by
'FoobarPtr'. However I don't have an idea how to solve it.
Greetings,
Stefan.
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2