sylveon / member_thunk

Dynamically creates executable code to allow C callbacks to call C++ member functions without the need for a user data parameter
MIT License
13 stars 2 forks source link

Restriction on argument to be replaced is too permissive for some combinations #18

Closed sylveon closed 4 years ago

sylveon commented 4 years ago

See https://godbolt.org/z/f3ji39 and https://godbolt.org/z/q28aVX. The new requirement should be std::is_pointer_v<T> || (std::is_integral_v<T> && sizeof(T) == sizeof(void*))