You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling with clang gives: call to implicitly-deleted copy constructor of 'Wrapper<NonCopyable>', so sol is relying on std::is_copy_constructible which should be generally enough (enough for non templated types).
But for types like the example above, we can use a specialized trait to modify the behavior (quite smooth if we are using a custom code generator).
sol documentation should shed some light on type traits, especially the comparison traits because for wrapped types (not pushed as custom types), we can't rely on std<type_traits> alone.
The text was updated successfully, but these errors were encountered:
The problem is that I can't make a simple repro where a type has a copy constructor implicitly deleted but is movable.
I know my example is broken, but my problem is occurring in a large codebase. If further repro is needed I can create it.
So basically a type with implicitly deleted copy constructor can't be binded with clang.
Consider: this thread
And this example:
and registering
globalFunction
with:lua["globalFunction"] = &globalFunction;
Compiling with clang gives:
call to implicitly-deleted copy constructor of 'Wrapper<NonCopyable>'
, sosol
is relying onstd::is_copy_constructible
which should be generally enough (enough for non templated types).But for types like the example above, we can use a specialized trait to modify the behavior (quite smooth if we are using a custom code generator).
sol documentation should shed some light on type traits, especially the comparison traits because for wrapped types (not pushed as custom types), we can't rely on
std
<type_traits>
alone.The text was updated successfully, but these errors were encountered: