Problem with adopt

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

Problem with adopt

Jens Weibler
Hi,

I have some trouble with the adopt policy..
Without adopt(result) for parse the following lua script works:

   local c = Compiler()
   local plan = c:parse("select * from bestellung")

   local rc
   rc = c:validatePlan(plan)

With adopt I get:
No matching overload found, candidates:
ErrorCode validatePlan(Compiler&,AccessPlan*&)

But I have no idea why!?



My exports:

luabind::class_<Compiler, auto_ptr<Compiler> > ("Compiler")
                 .def(luabind::constructor<>())
                 //.def("parse", &Compiler::parse,
luabind::adopt(luabind::result))
                 .def("parse", &Compiler::parse)
                 .def("validatePlan", &Compiler::validatePlan),

                 luabind::class_<AccessPlan> ("AccessPlan")

--
Jens


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user