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

const-removal and overload #1356

Open
maxdemarzi opened this issue May 21, 2022 · 0 comments
Open

const-removal and overload #1356

maxdemarzi opened this issue May 21, 2022 · 0 comments

Comments

@maxdemarzi
Copy link

I think a version of bug #155 has come back:

I have a bunch of overloaded functions that look like this and this works:

        lua.set_function("LinksGetLinks", sol::overload(
            ...
            [this](std::vector<Link> links, const std::string& rel_type) { return this->LinksGetLinksForTypeViaLua(links, rel_type); },
            ));

However if I flip the vector it to "const type&" I get "no matching function call takes this number of arguments and the specified types" just like issue #155 the string is unaffected.

        lua.set_function("LinksGetLinks", sol::overload(
            ....
            [this](const std::vector<Link>& links, const std::string& rel_type) { return this->LinksGetLinksForTypeViaLua(links, rel_type); },
            ));

Is this something that can be fixed or should I just start removing const type& from vectors everywhere?

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

No branches or pull requests

1 participant