Closed rpatters1 closed 2 years ago
See also https://docs.microsoft.com/en-us/cpp/cpp/compiler-limits?view=msvc-160 The REFL_TYPE/REFL_END syntax works around that limitation.
If REFL_TYPE
/REFL_END
is now the preferred syntax, it might be helpful to update the Doxygen pages to that effect. Or at least mention them as an alternative. What saved me was a random article about it on the internet. At first it seemed like the REFL_AUTO
syntax had superseded the other, which is why I started out using it.
EDIT:
I figured out that
refl-cpp
can already handle >100 items. You just have to use the other syntax:As far as I can tell, this syntax works identically to
REFL_AUTO
including support for user-defined properties. So my original enhancement request was moot. I'm leaving the rest of this issue here in case any other lost lamb comes looking for help with it. It would be helpful to call it out in the documentation as an alternative when there are >100 items in theREFL_AUTO
list.(Original text follows.)
=============================
I'm working with a pre-existing class framework that is risky to modify. I am finding myself exceeding or near-exceeding the 100-item limit in
REFL-AUTO
. Fine, I thought to myself, I'll just expand it to 200 in a fork. But then I hit an absurdly laughable limit in the Visual Studio 2019 compiler. It absolutely cannot and will not handle a macro with more than 127 arguments.It would be nice if there were a way to continue
REFL_AUTO
for a class in a subsequent macro. I don't understand therefl-cpp
code well enough to suggest a sensible syntax, but I'm thinking something along the lines of