veselink1 / refl-cpp

Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).
https://veselink1.github.io/refl-cpp/md__introduction.html
MIT License
1.06k stars 77 forks source link

Variadic expansion order is guaranteed for brace initializer expressions #32

Closed martinitus closed 4 years ago

martinitus commented 4 years ago

Hi folks,

I just stumbled over the following block in your code:

https://github.com/veselink1/refl-cpp/blob/fbdb82cbb97c17fd946c40414dba32efedee4224/refl.hpp#L1442-L1446

I had similar issues and found the following soltion:

https://stackoverflow.com/questions/61229653/mapping-odbc-bindings-to-function-callback-via-function-argument-evaluation-orde

However, this is apparently broken in current MSVC:

https://developercommunity.visualstudio.com/content/problem/1015101/invoking-a-constructor-using-brace-constructor-syn.html?childToView=1095038#comment-1095038

Regards, Marti

veselink1 commented 4 years ago

Hello Marti,

Thanks for the suggestion. I too would like to see the current implementation be replaced with a simpler one. We are aiming for good support for the last two versions of MSVC, v142 & v141. Therefore, unfortunately, we will not be able to make the suggested changes while we are still supporting those toolchains.

Regards, Veselin

veselink1 commented 4 years ago

I will close this issue now, as is it likely to be at least a couple of years before support for those can be dropped.