5 LUABIND_ANONYMOUS_FIX
int feedback
= 0;
9 const A
* f() { return this; }
11 void g() const { feedback
= 1; }
12 void g() { feedback
= 2; }
15 } // anonymous namespace
19 using namespace luabind
;
21 lua_State
* L
= lua_open();
23 int top
= lua_gettop(L
);
27 typedef void(A::*g1_t
)();
28 typedef void(A::*g2_t
)() const;
36 .def("g", /*(void(A::*)() const) &A::g*/ g1
)
37 .def("g", /*(void(A::*)()) &A::g*/ g2
);
39 if (dostring(L
, "a = A()")) return false;
40 if (dostring(L
, "a:g()")) return false;
41 if (feedback
!= 2) return false;
43 if (dostring(L
, "a2 = a:f()")) return false;
44 if (dostring(L
, "a2:g()")) return false;
45 if (feedback
!= 1) return false;
47 if (top
!= lua_gettop(L
)) return false;