Qualifiers in function parameters fails to compile
Rapptz opened this issue · comments
Danny commented
Having const
, volatile
, or reference qualifiers in function parameters causes (many) compiler errors.
Minimal test case:
#include <sol.hpp>
#include <iostream>
struct test {
void g(const std::string& str) {
std::cout << str << '\n';
}
};
int main() {
sol::state lua;
lua.new_userdata<test>("test", "g", &test::g);
lua.script("x = test.new()\n"
"x:g('hello')");
}
The Phantom Derpstorm commented
libstdc++ is very dumb
Danny commented
Stupid indeed: http://coliru.stacked-crooked.com/a/4faa8e87d8777d08
Danny commented
Fixed.