Strange issue on MSVC 10

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

Strange issue on MSVC 10

Maurício Gomes
I had to do several fixes to luabind 0.9 to compile on MSVC 10, it is plainly broken :/

Anyway, after I while it worked fine, except in the application that uses luabind, one single line refuses to compile, and I dunno why...

class_< vector<unsigned int> >("LayerList")
.def("GetCount", &vector<unsigned int>::size)
.def("Get",  &NumberGet)
.def("Add", &vector<unsigned int>::push_back) //line that refuses to compile, no matter what I do.
.def("__tostring", &LayerListToString)

So, .def("GetCount", &vector<unsigned int>::size) works fine, but .def("Add", &vector<unsigned int>::push_back) don't... I tried like "everything" that I could (even only randomly switching ordering of .defs, or even moving the stuff to other files, or places in the same file...)

The errors (it throw 9 errors in the same line) are all them about either wrong number of arguments, or not figuring what overload it is... like:

Error 1 error C2780: 'luabind::class_<T> &luabind::class_<T>::def(luabind::detail::operator_<Derived>)' : expects 1 arguments - 2 provided E:\novashellSVN\clanlibstuff\novashell\source\ListBindings.cpp 178

Error 7 error C2914: 'luabind::class_<T>::def' : cannot deduce template argument as function argument is ambiguous E:\novashellSVN\clanlibstuff\novashell\source\ListBindings.cpp 178

Someone has a clue? I already wasted about 9 precious hours trying to figure this stuff...

This Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
luabind-user mailing list
[hidden email]