luaaa icon indicating copy to clipboard operation
luaaa copied to clipboard

readme typo

Open esaulenka opened this issue 5 months ago • 2 comments

It looks like C++ Cat constructor should accept std::string (or std::string &)

https://github.com/gengyong/luaaa/blob/6613132cb0859a8e288eeaffec9f9e638b834cd2/README.md?plain=1#L31-L35

esaulenka avatar Jul 24 '25 15:07 esaulenka

std::string has a non-explicit constructor that accepts const char*, so you can implicitly construct a std::string by passing const char* directly.

gengyong avatar Jul 25 '25 15:07 gengyong

Yep, you are right about that.

But I'm talking about other thing. This class exported to Lua in this way:

// To export it:
LuaClass<Cat> luaCat(state, "AwesomeCat");
luaCat.ctor<std::string>();

But Cat above contains the only Cat() constructor which has no arguments.

esaulenka avatar Jul 25 '25 16:07 esaulenka