Closed rpatters1 closed 2 years ago
As the error message suggests, the condition propertyName == candidateName cannot be evaulated at compile time, because candidateName is captured by reference. Try to capture the name or member by value and use that.
I understand that there is a difference in the behaviour of MSVC and gcc, but this is not something that I can fix in refl-cpp. (I believe MSVC actually implements this correctly and that this is forbidden by C++17/20.) \
Sorry, I am closing this now, but thanks for reporting it!
I was basically trying to implement my own get_writer
so in a way refl-cpp
did address it.
This is a followup to issue #52. If that issue is resolved (by applying the change in pull request #53), then this problem arises. For some reason, the compiler is unhappy with any kind of capture in the nested lamda. As mentioned in the title, this code compiles and runs correctly on XCode/GCC.
The full error log is here: