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

Unable to register a table #68

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Unable to register a table #68

wants to merge 2 commits into from

Conversation

perciun-andrei
Copy link

The following piece of code was not compiling

sol::state state;
sol::table some_table = state.create_table();
state.set("some_table", some_table);

The compilation error which was fixed

Users/andreiperciun/Developer/paper-rl/build/sources/libraries/sol/sol_develop/src/project-sol/sol/stack.hpp:344:15: error: cannot initialize return object of type 'int' with an rvalue of type 'void'
       return ref.push();
              ^~~~~~~~~~
/Users/andreiperciun/Developer/paper-rl/build/sources/libraries/sol/sol_develop/src/project-sol/sol/stack.hpp:97:37: note: in instantiation of function template specialization
      'sol::stack::pusher<sol::table, void>::push<sol::table, 0>' requested here
    return pusher<Unqualified<T>>{}.push(L, std::forward<T>(t), std::forward<Args>(args)...);
                                    ^
/Users/andreiperciun/Developer/paper-rl/build/sources/libraries/sol/sol_develop/src/project-sol/sol/table.hpp:70:16: note: in instantiation of function template specialization
      'sol::stack::push<sol::table &>' requested here
        stack::push(state(), std::forward<U>(value));
               ^
/Users/andreiperciun/Developer/paper-rl/build/sources/libraries/sol/sol_develop/src/project-sol/sol/state.hpp:147:16: note: in instantiation of function template specialization
      'sol::table::set<char const (&)[8], sol::table &>' requested here
        global.set(std::forward<T>(key), std::forward<U>(value));

@ThePhD
Copy link
Contributor

ThePhD commented Oct 20, 2015

Hey, thanks for the PR!

I fixed this in my develop branch of sol, waiting to be PRd at #62. Currently, the original author seems really busy, so it might be a while before this all makes it in.

@perciun-andrei
Copy link
Author

Thank you for your comment. Let me know if I need to delete this PR.

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.

3 participants