Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [1/2] Compiling main.cpp
- FAILED: g++ -MMD -MF obj/main.o.d -std=c++11 -pedantic -pedantic-errors -Wextra -Wall -O2 -DNDEBUG -c main.cpp -o obj/main.o -I"."
- In file included from ./sol/state.hpp:26:0,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/table.hpp: In instantiation of 'sol::table& sol::table::set_lvalue_fx(std::false_type, T&&, TFx&&, TObj&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (member_test::*)(); TObj = member_test; std::false_type = std::integral_constant<bool, false>]':
- ./sol/table.hpp:83:81: required from 'sol::table& sol::table::set_function(T&&, TFx&&, TObj&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (member_test::*)(); TObj = member_test]'
- main.cpp:47:99: required from here
- ./sol/table.hpp:127:127: error: no matching function for call to 'sol::explicit_lua_func<std::basic_string<char> (member_test::*)(), member_test, true>::explicit_lua_func(member_test, std::basic_string<char> (member_test::*)())'
- std::unique_ptr<lua_func> sptr(new explicit_lua_func<clean_fx, TObj>(std::forward<TObj>( obj ), std::forward<TFx>(fx)));
- ^
- ./sol/table.hpp:127:127: note: candidates are:
- In file included from ./sol/table.hpp:26:0,
- from ./sol/state.hpp:26,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/lua_function.hpp:205:5: note: template<class ... FxArgs> sol::explicit_lua_func<TFx, T, true>::explicit_lua_func(T&, FxArgs&& ...)
- explicit_lua_func(T& m, FxArgs&&... fxargs): fx(std::addressof(m), std::forward<FxArgs>(fxargs)...) {}
- ^
- ./sol/lua_function.hpp:205:5: note: template argument deduction/substitution failed:
- In file included from ./sol/state.hpp:26:0,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/table.hpp:127:127: note: cannot convert 'std::forward<member_test>((* & obj))' (type 'member_test') to type 'member_test&'
- std::unique_ptr<lua_func> sptr(new explicit_lua_func<clean_fx, TObj>(std::forward<TObj>( obj ), std::forward<TFx>(fx)));
- ^
- In file included from ./sol/table.hpp:26:0,
- from ./sol/state.hpp:26,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/lua_function.hpp:202:5: note: template<class ... FxArgs> sol::explicit_lua_func<TFx, T, true>::explicit_lua_func(T*, FxArgs&& ...)
- explicit_lua_func(T* m, FxArgs&&... fxargs): fx(m, std::forward<FxArgs>(fxargs)...) {}
- ^
- ./sol/lua_function.hpp:202:5: note: template argument deduction/substitution failed:
- In file included from ./sol/state.hpp:26:0,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/table.hpp:127:127: note: cannot convert 'std::forward<member_test>((* & obj))' (type 'member_test') to type 'member_test*'
- std::unique_ptr<lua_func> sptr(new explicit_lua_func<clean_fx, TObj>(std::forward<TObj>( obj ), std::forward<TFx>(fx)));
- ^
- In file included from ./sol/table.hpp:26:0,
- from ./sol/state.hpp:26,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/lua_function.hpp:185:8: note: constexpr sol::explicit_lua_func<std::basic_string<char> (member_test::*)(), member_test, true>::explicit_lua_func(const sol::explicit_lua_func<std::basic_string<char> (member_test::*)(), member_test, true>&)
- struct explicit_lua_func<TFx, T, true> : public lua_func {
- ^
- ./sol/lua_function.hpp:185:8: note: candidate expects 1 argument, 2 provided
- ./sol/lua_function.hpp:185:8: note: constexpr sol::explicit_lua_func<std::basic_string<char> (member_test::*)(), member_test, true>::explicit_lua_func(sol::explicit_lua_func<std::basic_string<char> (member_test::*)(), member_test, true>&&)
- ./sol/lua_function.hpp:185:8: note: candidate expects 1 argument, 2 provided
- In file included from ./sol/state.hpp:26:0,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/table.hpp: In instantiation of 'sol::table& sol::table::set_fx(std::false_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (*)(); std::false_type = std::integral_constant<bool, false>]':
- ./sol/table.hpp:94:85: required from 'sol::table& sol::table::set_isfunction_fx(std::true_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (*)(); std::true_type = std::integral_constant<bool, true>]'
- ./sol/table.hpp:77:106: required from 'sol::table& sol::table::set_function(T&&, TFx&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (*)()]'
- main.cpp:37:72: required from here
- ./sol/table.hpp:173:55: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
- void* userdata = reinterpret_cast<void*>(target);
- ^
- ./sol/table.hpp: In instantiation of 'sol::table& sol::table::set_fx(std::true_type, T&&, TFx&&, TObj&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (member_test::*)(); TObj = member_test&; std::true_type = std::integral_constant<bool, true>]':
- ./sol/table.hpp:121:109: required from 'sol::table& sol::table::set_lvalue_fx(std::true_type, T&&, TFx&&, TObj&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (member_test::*)(); TObj = member_test&; std::true_type = std::integral_constant<bool, true>]'
- ./sol/table.hpp:83:81: required from 'sol::table& sol::table::set_function(T&&, TFx&&, TObj&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (member_test::*)(); TObj = member_test&]'
- main.cpp:42:89: required from here
- ./sol/table.hpp:155:9: warning: missing initializer for member 'luaL_Reg::name' [-Wmissing-field-initializers]
- };
- ^
- ./sol/table.hpp:155:9: warning: missing initializer for member 'luaL_Reg::func' [-Wmissing-field-initializers]
- In file included from ./sol/table.hpp:26:0,
- from ./sol/state.hpp:26,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/lua_function.hpp: In instantiation of 'static int sol::static_lua_func<TFx>::call(lua_State*) [with TFx = std::basic_string<char> (*)(); lua_State = lua_State]':
- ./sol/table.hpp:174:33: required from 'sol::table& sol::table::set_fx(std::false_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (*)(); std::false_type = std::integral_constant<bool, false>]'
- ./sol/table.hpp:94:85: required from 'sol::table& sol::table::set_isfunction_fx(std::true_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (*)(); std::true_type = std::integral_constant<bool, true>]'
- ./sol/table.hpp:77:106: required from 'sol::table& sol::table::set_function(T&&, TFx&&) [with T = const char (&)[4]; TFx = std::basic_string<char> (*)()]'
- main.cpp:37:72: required from here
- ./sol/lua_function.hpp:52:52: error: invalid static_cast from type 'void*' to type 'std::basic_string<char> (*)()'
- fx_t* fx = *static_cast<fx_t*>(functiondata);
- ^
- In file included from ./sol/state.hpp:26:0,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/table.hpp: In instantiation of 'sol::table& sol::table::set_fx(std::false_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = const char* (*)(); std::false_type = std::integral_constant<bool, false>]':
- ./sol/table.hpp:94:85: required from 'sol::table& sol::table::set_isfunction_fx(std::true_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = const char* (*)(); std::true_type = std::integral_constant<bool, true>]'
- ./sol/table.hpp:109:107: required from 'sol::table& sol::table::set_isconvertible_fx(std::true_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = main()::__lambda3; std::true_type = std::integral_constant<bool, true>]'
- ./sol/table.hpp:102:96: required from 'sol::table& sol::table::set_isfunction_fx(std::false_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = main()::__lambda3; std::false_type = std::integral_constant<bool, false>]'
- ./sol/table.hpp:77:106: required from 'sol::table& sol::table::set_function(T&&, TFx&&) [with T = const char (&)[4]; TFx = main()::__lambda3]'
- main.cpp:34:9: required from here
- ./sol/table.hpp:173:55: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
- void* userdata = reinterpret_cast<void*>(target);
- ^
- In file included from ./sol/table.hpp:26:0,
- from ./sol/state.hpp:26,
- from ./sol.hpp:25,
- from main.cpp:1:
- ./sol/lua_function.hpp: In instantiation of 'static int sol::static_lua_func<TFx>::call(lua_State*) [with TFx = const char* (*)(); lua_State = lua_State]':
- ./sol/table.hpp:174:33: required from 'sol::table& sol::table::set_fx(std::false_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = const char* (*)(); std::false_type = std::integral_constant<bool, false>]'
- ./sol/table.hpp:94:85: required from 'sol::table& sol::table::set_isfunction_fx(std::true_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = const char* (*)(); std::true_type = std::integral_constant<bool, true>]'
- ./sol/table.hpp:109:107: required from 'sol::table& sol::table::set_isconvertible_fx(std::true_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = main()::__lambda3; std::true_type = std::integral_constant<bool, true>]'
- ./sol/table.hpp:102:96: required from 'sol::table& sol::table::set_isfunction_fx(std::false_type, T&&, TFx&&) [with T = const char (&)[4]; TFx = main()::__lambda3; std::false_type = std::integral_constant<bool, false>]'
- ./sol/table.hpp:77:106: required from 'sol::table& sol::table::set_function(T&&, TFx&&) [with T = const char (&)[4]; TFx = main()::__lambda3]'
- main.cpp:34:9: required from here
- ./sol/lua_function.hpp:52:52: error: invalid static_cast from type 'void*' to type 'const char* (*)()'
- fx_t* fx = *static_cast<fx_t*>(functiondata);
- ^
- ninja: build stopped: subcommand failed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement