Previously I was using a version of sol3 from January 28th with no issues. I updated to the version from march 14th (the most recent as of now), and now I am receiving the following compile error with code C2955:
'sol::wrap': use of class template requires template argument list
This error occurs on line 15906 of sol.hpp (using the single header version of sol3).
Here's the minimum code to cause the error:
const char* TestFunc()
{
return "Test";
}
Lua["TestFunc"] = TestFunc;
````
Regardless of the other functions I tried, the error remains. Also tried this, which didn't fix it:
```cpp
Lua.set_function("TestFunc", TestFunc);
Some info about my build environment:
Let me know if there's other info that'd be useful to you.
I can't seem to repro this in any way, whether I use different Lua versions, x86 vs x64, or more.
Try with latest sol3 beta. I don't know what the problem is to be honest. Best I can guess is that the function might be coverloaded so its ambigous or something: I cannot repro on Windows or Linux, GCC or VS2017, x86 or x64.
I tried the latest version and I'm still having the same problem. I decided to make a new project to see if I had borked the compile settings. One thing I noticed is that by default, the "permissive" flag is used with VS projects. In my main project I have that flag disabled. If I re-enable that flag, I get a different error:
Error C3779 'sol::stack::stack_detail::unchecked_unqualified_get': a function that returns 'decltype(auto)' cannot be used before it is defined
On line 11531 of sol.hpp
I've uploaded a test project where I get the same result. I've included all the lib files needed to compile: https://github.com/Moneyl/Sol3-compile-error-example
The only compilation flag I changed was setting it to use c++17. Everything else should be the default. It's setup to compile for 32bit windows.
How updated is your VS 2017? (That is, does the Visual Studio Installer say it needs to upgrade?)
Good idea. I updated VS community edition from 15.9.8 to 15.9.9, and updated all VS extensions for good measure. The issue persists on both projects. Also, I did a fresh install of windows 10 and vs 1-2 weeks ago, so I don't believe there should be anything exceptional about my build environment.
I tested out the latest version of sol2 and it's working fine, so at least we know that if worst comes to worst I can revert to sol2. It probably won't make a difference, but I'll try switching over to the multi-header version of sol3 to see if that changes anything.
Nope, that didn't solve the problem.
Out of curiosity I downloaded the visual studio 2019 preview and tested this again with that. The issue still occurs. I have no other ideas on what about my system/build environment could be causing this. For now I'm just gonna use sol2 since it's working fine for me and I don't need any of the new features from sol3 just yet. I'll close the issue, and if I manage to get it working I'll be sure to let you know here / on discord.

I don't know what's going on. I turned off the /permissive flag and everything worked out fine, with the current sol3 and the one packaged in the repository. I tried x64 and x86. I don't know what's going on with your installation of the compiler. Sorry! I wish I could help more, but without a way to reproduce this I can't do much...
Wanted to let you know that using the latest version of sol3 and VS2019 16.3.3 I can now compile my project with sol3. Not sure what was causing it, but I'm glad it's working now.
Nice.
A few bugs I was tracking on Developer Community got fixed and they just pushed 16.3.3, so that's probably why! Glad it's all kosher for you.
Most helpful comment
I don't know what's going on. I turned off the /permissive flag and everything worked out fine, with the current sol3 and the one packaged in the repository. I tried x64 and x86. I don't know what's going on with your installation of the compiler. Sorry! I wish I could help more, but without a way to reproduce this I can't do much...