Closed sdebionne closed 2 years ago
Class templates already work with BOOST_DESCRIBE_CLASS. (But MSVC can't compile it due to compiler bugs.)
Awesome, I was unlucky then. Just to be sure, BOOST_DESCRIBE_CLASS
works with class templates but not BOOST_DESCRIBE_STRUCT
or am I reading too much between the lines? It's just that BOOST_DESCRIBE_CLASS
is slightly more intrusive, being defined inside the class...
That's correct, BOOST_DESCRIBE_CLASS works, BOOST_DESCRIBE_STRUCT doesn't (work for templates).
However I notice I don't actually have a test for it. I probably intended to add one and got distracted with other things.
Oh it works with VS 16.10. Cool.
Thanks for clarifying. Making BOOST_DESCRIBE_STRUCT
work for templates, would that be possible? If not, I'll just close the issue.
No, it can't work as is. It might be possible to have another macro BOOST_DESCRIBE_TEMPLATE_STRUCT
but the syntax in the general case will be awful, I think.
It turns out it only works with VS2019 with /std:c++latest. :-)
It might be possible to have another macro BOOST_DESCRIBE_TEMPLATE_STRUCT but the syntax in the general case will be awful, I think.
Any chance that you got new ideas how to implement a non-intrusive description of class template ? Just checking before giving it a try...
No, I haven't been considering it.
Would support for class template description be implementable (eventually with a different macro)?