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.24k stars 520 forks source link

Binding pointer to pointer type doesn't compile #1624

Open deadlocklogic opened 2 months ago

deadlocklogic commented 2 months ago

Consider

struct Test {};

and the binding code

Test1** test;
lua["Test"] = test;

Error messages:

/opt/compiler-explorer/libs/sol2/trunk/include/sol/stack_core.hpp:1416:28: error: no matching function for call to object of type 'std::less<void>'
/opt/compiler-explorer/libs/sol2/trunk/include/sol/stack_core.hpp:1416:28: error: no matching function for call to object of type 'std::less_equal<void>'
/opt/compiler-explorer/libs/sol2/trunk/include/sol/stack_core.hpp:1416:28: error: no matching function for call to object of type 'std::equal_to<void>'

@ThePhD Any ideas on how to pass raw pointer to pointer?