decimad / luabind-deboostified

Create Lua bindings for your C++ code easily - my improvements
http://www.vrac.iastate.edu/vancegroup/docs/luabind/
Other
71 stars 26 forks source link

Fixed errors when compiling with Clang #25

Closed cschreib closed 8 years ago

cschreib commented 8 years ago

These changes allow the library to compile with Clang 3.3 and 3.5, the only two versions I could test. Apart from enabling C++11 features explicitly in the CMake configuration, I also had to fix issues of shadowing templates parameters (i.e., using a template<typename T> as template argument of a member function in a class that already has a template parameter T) and template function call disambiguation (i.e., having to write obj.template foo<bar>() to call obj.foo<bar>() inside templated contexts).

Not included in this pull request: I also had to disable the test test_upvalues() in test_object.cpp because the compiler could not find a suitable comparison operator between the result of getupvalue() and integers. I suppose this is caused by an API change that was not propagated in the tests, since getupvalue() currently returns a tuple. The tuple elements are const char* and luabind::object, neither of which should be compared to integers. My limited knowledge of the library prevented me from figuring out the proper way to fix this, so I just disabled the test. I suppose this should be fixed as well.