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 compile error when registering new user types with operator() #1277

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

matusfedorko
Copy link
Contributor

Compiling with the latest develop branch, the following would fail to compile (tested in MSVC 2019):

#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>

struct Ptr
{
	int* operator()() { return nullptr; }
	const int* operator()() const { return nullptr; }
};

int main()
{
	sol::state lua;
	lua.new_usertype<Ptr>("Ptr");
	return 0;
}

@ThePhD
Copy link
Owner

ThePhD commented Jan 3, 2022

I think this should work, but I need to run the tests for a bunch of platforms to make sure.

I also need to get GitHub Actions running and figure out how to rip these appveyor/travis-ci checks out of the PRs already...

@ThePhD
Copy link
Owner

ThePhD commented Jun 24, 2022

We're about to find out how broken this is! Thanks for submitting.

@ThePhD ThePhD merged commit 13b7e8a into ThePhD:develop Jun 24, 2022
@ThePhD ThePhD self-assigned this Jun 24, 2022
@ThePhD ThePhD added Bug.Well Shit Here we go again... Fuuuu.VC++ labels Jun 24, 2022
@ThePhD ThePhD added this to the Bugs milestone Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug.Well Shit Here we go again... Fuuuu.VC++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants