Additions for gitignore for the new files that are necessary to kick around qtCreator

Fix for userdata to accept base classes where the derived class uses the name of a base member function to access it (Derived::get_num, where get_num is only implemented in Base::get_num)
VC++ makes this acceptance easy by taking the name as "Derived", but GCC and Clang
This commit is contained in:
ThePhD 2014-05-25 13:46:23 -04:00
parent b68a57c65c
commit 41e1ca2baa
2 changed files with 9 additions and 2 deletions

6
.gitignore vendored
View File

@ -18,3 +18,9 @@ liblua.a
sol/include/ sol/include/
.ninja* .ninja*
include/ include/
lib/liblua5.2.a
*.config
*.creator
*.files
*.includes
main.cpp

View File

@ -110,8 +110,9 @@ private:
template<std::size_t N> template<std::size_t N>
void build_function_tables() {} void build_function_tables() {}
template<std::size_t N, typename... Args, typename Ret> template<std::size_t N, typename... Args, typename TBase, typename Ret>
void build_function_tables(std::string name, Ret T::* func, Args&&... args) { void build_function_tables(std::string name, Ret TBase::* func, Args&&... args) {
static_assert(std::is_base_of<TBase, T>::value, "Any registered function must be part of the class");
typedef typename std::decay<decltype(func)>::type function_type; typedef typename std::decay<decltype(func)>::type function_type;
functionnames.push_back(std::move(name)); functionnames.push_back(std::move(name));
functions.emplace_back(detail::make_unique<userdata_function<function_type, T>>(std::move(func))); functions.emplace_back(detail::make_unique<userdata_function<function_type, T>>(std::move(func)));