Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation issues with gcc 7.x #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

azurepine
Copy link

No description provided.

@Xottab-DUTY
Copy link

@decimad, will you review this?)

@decimad
Copy link
Owner

decimad commented Apr 15, 2018

I will have a look

@Xottab-DUTY
Copy link

I hope this will be merged someday 😃

@Wohlstand
Copy link

Still failing on GCC 6.4 at me:

[ 93%] Building CXX object test/CMakeFiles/test_policies.dir/test_policies.cpp.o
In file included from /.../luabind/detail/conversion_policies/conversion_policies.hpp:36:0,
                 from /.../luabind/detail/object.hpp:383,
                 from /.../luabind/make_function.hpp:9,
                 from /.../luabind/function.hpp:8,
                 from /.../luabind/class.hpp:81,
                 from /.../luabind/luabind.hpp:28,
                 from /.../test/test_policies.cpp:25:
/.../luabind/detail/conversion_policies/function_converter.hpp: In instantiation of ‘void luabind::default_converter<F, typename std::enable_if<luabind::detail::is_function<typename luabind::remove_const_reference<T>::type>::value>::type>::to_lua(lua_State*, F) [with F = std::function<int(int, int)>; typename std::enable_if<luabind::detail::is_function<typename luabind::remove_const_reference<T>::type>::value>::type = void; lua_State = lua_State]’:
/.../luabind/detail/call.hpp:393:6:   required from ‘static void luabind::detail::invoke_struct<PolicyList, Signature, F>::call_struct<false, false, luabind::meta::index_list<ArgumentIndices ...> >::call(lua_State*, F&, typename luabind::detail::invoke_struct<PolicyList, Signature, F>::traits::argument_converter_tuple_type&) [with unsigned int ...ArgumentIndices = {}; PolicyList = luabind::meta::type_list<>; Signature = luabind::meta::type_list<std::function<int(int, int)> >; F = std::function<int(int, int)> (*)(); lua_State = lua_State; typename luabind::detail::invoke_struct<PolicyList, Signature, F>::traits::argument_converter_tuple_type = std::tuple<>]’
/.../luabind/detail/call.hpp:521:13:   required from ‘static int luabind::detail::invoke_struct<PolicyList, Signature, F>::invoke(lua_State*, const luabind::detail::function_object&, luabind::detail::invoke_context&, F&) [with PolicyList = luabind::meta::type_list<>; Signature = luabind::meta::type_list<std::function<int(int, int)> >; F = std::function<int(int, int)> (*)(); lua_State = lua_State]’
/.../luabind/detail/call.hpp:539:58:   required from ‘int luabind::detail::invoke(lua_State*, const luabind::detail::function_object&, luabind::detail::invoke_context&, F&) [with PolicyList = luabind::meta::type_list<>; Signature = luabind::meta::type_list<std::function<int(int, int)> >; F = std::function<int(int, int)> (*)(); lua_State = lua_State]’
/.../luabind/make_function.hpp:58:47:   required from ‘static bool luabind::detail::function_object_impl<F, Signature, InjectorList>::invoke_defer(lua_State*, luabind::detail::function_object_impl<F, Signature, InjectorList>*, luabind::detail::invoke_context&, int&) [with F = std::function<int(int, int)> (*)(); Signature = luabind::meta::type_list<std::function<int(int, int)> >; InjectorList = luabind::meta::type_list<>; lua_State = lua_State]’
/.../luabind/make_function.hpp:79:41:   required from ‘static int luabind::detail::function_object_impl<F, Signature, InjectorList>::entry_point(lua_State*) [with F = std::function<int(int, int)> (*)(); Signature = luabind::meta::type_list<std::function<int(int, int)> >; InjectorList = luabind::meta::type_list<>; lua_State = lua_State]’
/.../luabind/make_function.hpp:33:23:   required from ‘luabind::detail::function_object_impl<F, Signature, InjectorList>::function_object_impl(F) [with F = std::function<int(int, int)> (*)(); Signature = luabind::meta::type_list<std::function<int(int, int)> >; InjectorList = luabind::meta::type_list<>]’
/.../luabind/make_function.hpp:111:39:   required from ‘luabind::adl::object luabind::make_function(lua_State*, F, luabind::meta::type_list<Types2 ...>, luabind::meta::type_list<TailTypes ...>) [with F = std::function<int(int, int)> (*)(); SignatureElements = {std::function<int(int, int)>}; PolicyInjectors = {}; lua_State = lua_State]’
/.../luabind/make_function.hpp:117:23:   required from ‘luabind::adl::object luabind::make_function(lua_State*, F, luabind::meta::type_list<Types2 ...>) [with F = std::function<int(int, int)> (*)(); PolicyInjectors = {}; lua_State = lua_State]’
/.../luabind/function.hpp:27:30:   required from ‘void luabind::detail::function_registration<F, PolicyInjectors>::register_(lua_State*) const [with F = std::function<int(int, int)> (*)(); PolicyInjectors = luabind::meta::type_list<>; lua_State = lua_State]’
/.../test/test_policies.cpp:278:1:   required from here
/.../luabind/detail/conversion_policies/function_converter.hpp:86:17: error: ‘make_function’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
    make_function(L, value).push(L);
    ~~~~~~~~~~~~~^~~~~~~~~~
In file included from /.../luabind/function.hpp:8:0,
                 from /.../luabind/class.hpp:81,
                 from /.../luabind/luabind.hpp:28,
                 from /.../test/test_policies.cpp:25:
/.../luabind/make_function.hpp:121:9: note: ‘template<class F> luabind::adl::object luabind::make_function(lua_State*, F)’ declared here, later in the translation unit
  object make_function(lua_State* L, F f)
         ^~~~~~~~~~~~~

LuaBind itslef now buildable, however, the "test_policies" fails to be built

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants