Clang on macOS appears to be stricter in a few regards than MSVC.
FFPropertyReadFunc shouldn't be a function reference because instances are created in-place in TReaderLambdaGen. To ensure proper lifetime of the function, the function iself must be passed as a value.
This is corroborated by UE's documentation in Function.h:
TFunctionRef\
A class which represents a reference to something callable. The important part here is reference - if
you bind it to a lambda and the lambda goes out of scope, you will be left with an invalid reference.
With regards to the changes to the if statements, I think we can all agree that this shouldn't have worked in the first place.
Clang on macOS appears to be stricter in a few regards than MSVC.
FFPropertyReadFunc
shouldn't be a function reference because instances are created in-place inTReaderLambdaGen
. To ensure proper lifetime of the function, the function iself must be passed as a value. This is corroborated by UE's documentation inFunction.h
:With regards to the changes to the if statements, I think we can all agree that this shouldn't have worked in the first place.