ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.12k stars 500 forks source link

Add note for LuaJIT 5.2 style containers in the documentation #1448

Closed tatjam closed 1 year ago

tatjam commented 1 year ago

If you use the LUAJIT_ENABLE_LUA52COMPAT compilation flag with LuaJIT, C++ containers can be used just fine with ipairs or pairs as these properly check the metatable keys __ipairs and __pairs used by sol to implement this behavior.

I've not tested this behavior in-depth, but it should work fine with all containers.

ThePhD commented 1 year ago

This is great to know; thank you!