Advertisement
Rapptz

Untitled

Dec 8th, 2013
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 10.46 KB | None | 0 0
  1. [1/2] Compiling main.cpp
  2. 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"."
  3. In file included from ./sol/state.hpp:26:0,
  4.  
  5.                  from ./sol.hpp:25,
  6.  
  7.                  from main.cpp:1:
  8.  
  9. ./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>]':
  10.  
  11. ./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]'
  12.  
  13. main.cpp:47:99:   required from here
  14.  
  15. ./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::*)())'
  16.  
  17.          std::unique_ptr<lua_func> sptr(new explicit_lua_func<clean_fx, TObj>(std::forward<TObj>( obj ), std::forward<TFx>(fx)));
  18.  
  19.                                                                                                                                ^
  20.  
  21. ./sol/table.hpp:127:127: note: candidates are:
  22.  
  23. In file included from ./sol/table.hpp:26:0,
  24.  
  25.                  from ./sol/state.hpp:26,
  26.  
  27.                  from ./sol.hpp:25,
  28.  
  29.                  from main.cpp:1:
  30.  
  31. ./sol/lua_function.hpp:205:5: note: template<class ... FxArgs> sol::explicit_lua_func<TFx, T, true>::explicit_lua_func(T&, FxArgs&& ...)
  32.  
  33.      explicit_lua_func(T& m, FxArgs&&... fxargs): fx(std::addressof(m), std::forward<FxArgs>(fxargs)...) {}
  34.  
  35.      ^
  36.  
  37. ./sol/lua_function.hpp:205:5: note:   template argument deduction/substitution failed:
  38.  
  39. In file included from ./sol/state.hpp:26:0,
  40.  
  41.                  from ./sol.hpp:25,
  42.  
  43.                  from main.cpp:1:
  44.  
  45. ./sol/table.hpp:127:127: note:   cannot convert 'std::forward<member_test>((* & obj))' (type 'member_test') to type 'member_test&'
  46.  
  47.          std::unique_ptr<lua_func> sptr(new explicit_lua_func<clean_fx, TObj>(std::forward<TObj>( obj ), std::forward<TFx>(fx)));
  48.  
  49.                                                                                                                                ^
  50.  
  51. In file included from ./sol/table.hpp:26:0,
  52.  
  53.                  from ./sol/state.hpp:26,
  54.  
  55.                  from ./sol.hpp:25,
  56.  
  57.                  from main.cpp:1:
  58.  
  59. ./sol/lua_function.hpp:202:5: note: template<class ... FxArgs> sol::explicit_lua_func<TFx, T, true>::explicit_lua_func(T*, FxArgs&& ...)
  60.  
  61.      explicit_lua_func(T* m, FxArgs&&... fxargs): fx(m, std::forward<FxArgs>(fxargs)...) {}
  62.  
  63.      ^
  64.  
  65. ./sol/lua_function.hpp:202:5: note:   template argument deduction/substitution failed:
  66.  
  67. In file included from ./sol/state.hpp:26:0,
  68.  
  69.                  from ./sol.hpp:25,
  70.  
  71.                  from main.cpp:1:
  72.  
  73. ./sol/table.hpp:127:127: note:   cannot convert 'std::forward<member_test>((* & obj))' (type 'member_test') to type 'member_test*'
  74.  
  75.          std::unique_ptr<lua_func> sptr(new explicit_lua_func<clean_fx, TObj>(std::forward<TObj>( obj ), std::forward<TFx>(fx)));
  76.  
  77.                                                                                                                                ^
  78.  
  79. In file included from ./sol/table.hpp:26:0,
  80.  
  81.                  from ./sol/state.hpp:26,
  82.  
  83.                  from ./sol.hpp:25,
  84.  
  85.                  from main.cpp:1:
  86.  
  87. ./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>&)
  88.  
  89.  struct explicit_lua_func<TFx, T, true> : public lua_func {
  90.  
  91.         ^
  92.  
  93. ./sol/lua_function.hpp:185:8: note:   candidate expects 1 argument, 2 provided
  94.  
  95. ./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>&&)
  96.  
  97. ./sol/lua_function.hpp:185:8: note:   candidate expects 1 argument, 2 provided
  98.  
  99. In file included from ./sol/state.hpp:26:0,
  100.  
  101.                  from ./sol.hpp:25,
  102.  
  103.                  from main.cpp:1:
  104.  
  105. ./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>]':
  106.  
  107. ./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>]'
  108.  
  109. ./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> (*)()]'
  110.  
  111. main.cpp:37:72:   required from here
  112.  
  113. ./sol/table.hpp:173:55: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
  114.  
  115.         void* userdata = reinterpret_cast<void*>(target);
  116.  
  117.                                                        ^
  118.  
  119. ./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>]':
  120.  
  121. ./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>]'
  122.  
  123. ./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&]'
  124.  
  125. main.cpp:42:89:   required from here
  126.  
  127. ./sol/table.hpp:155:9: warning: missing initializer for member 'luaL_Reg::name' [-Wmissing-field-initializers]
  128.  
  129.          };
  130.  
  131.          ^
  132.  
  133. ./sol/table.hpp:155:9: warning: missing initializer for member 'luaL_Reg::func' [-Wmissing-field-initializers]
  134.  
  135. In file included from ./sol/table.hpp:26:0,
  136.  
  137.                  from ./sol/state.hpp:26,
  138.  
  139.                  from ./sol.hpp:25,
  140.  
  141.                  from main.cpp:1:
  142.  
  143. ./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]':
  144.  
  145. ./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>]'
  146.  
  147. ./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>]'
  148.  
  149. ./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> (*)()]'
  150.  
  151. main.cpp:37:72:   required from here
  152.  
  153. ./sol/lua_function.hpp:52:52: error: invalid static_cast from type 'void*' to type 'std::basic_string<char> (*)()'
  154.  
  155.          fx_t* fx = *static_cast<fx_t*>(functiondata);
  156.  
  157.                                                     ^
  158.  
  159. In file included from ./sol/state.hpp:26:0,
  160.  
  161.                  from ./sol.hpp:25,
  162.  
  163.                  from main.cpp:1:
  164.  
  165. ./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>]':
  166.  
  167. ./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>]'
  168.  
  169. ./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>]'
  170.  
  171. ./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>]'
  172.  
  173. ./sol/table.hpp:77:106:   required from 'sol::table& sol::table::set_function(T&&, TFx&&) [with T = const char (&)[4]; TFx = main()::__lambda3]'
  174.  
  175. main.cpp:34:9:   required from here
  176.  
  177. ./sol/table.hpp:173:55: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
  178.  
  179.         void* userdata = reinterpret_cast<void*>(target);
  180.  
  181.                                                        ^
  182.  
  183. In file included from ./sol/table.hpp:26:0,
  184.  
  185.                  from ./sol/state.hpp:26,
  186.  
  187.                  from ./sol.hpp:25,
  188.  
  189.                  from main.cpp:1:
  190.  
  191. ./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]':
  192.  
  193. ./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>]'
  194.  
  195. ./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>]'
  196.  
  197. ./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>]'
  198.  
  199. ./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>]'
  200.  
  201. ./sol/table.hpp:77:106:   required from 'sol::table& sol::table::set_function(T&&, TFx&&) [with T = const char (&)[4]; TFx = main()::__lambda3]'
  202.  
  203. main.cpp:34:9:   required from here
  204.  
  205. ./sol/lua_function.hpp:52:52: error: invalid static_cast from type 'void*' to type 'const char* (*)()'
  206.  
  207.          fx_t* fx = *static_cast<fx_t*>(functiondata);
  208.  
  209.                                                     ^
  210.  
  211. ninja: build stopped: subcommand failed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement