Try to fix WTF::Function so we don't need explicit conversion on Windows
Created attachment 315549 [details] Patch
Trying out Yusuke’s suggestion: "I'm not 100% confident, but can you try it `&testFunction` instead?"
Wow, seems like you were right Yusuke! Is that a bug in the Windows compiler, or what?
(In reply to Darin Adler from comment #3) > Wow, seems like you were right Yusuke! Is that a bug in the Windows > compiler, or what? My guess is that Function's Callable/FunctionType becomes function instead of function pointer. And it seems that MSVC does not encourage implicit function to function pointer conversion in this case. http://en.cppreference.com/w/cpp/language/implicit_conversion#Function_to_pointer If the implicit conversion works, it becomes rvalue of the pointer to the function. By using `&testFunction`, we explicitly convert a function to rvalue of a pointer to a function. Then, it works correctly.
I wonder if there’s a way to work around this in WTF::Function instead of my adding the & at each use.
I’m not going to bother with this for now.