You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is far from complete and is probably not the best way to implement it, but shows the idea. Would it be useful to have similar wrappers as a part of visit_struct?
The text was updated successfully, but these errors were encountered:
One issue is, std::variant is C++17, while visit_struct targets C++11.
Another issue is, lots of projects use lots of different variants, for example, std::variant is not strongly exception-safe so it isn't appropriate in many cases.
You could side-step that to some extent I suppose if you make it a variant containing references to the value actually contained in the struct instead of copies of those values?
I agree that this would be useful functionality, although it would expand the scope of visit_struct significantly. I'll write again with more thoughts.
It may be sometimes useful to have also runtime reflection. So I came up with some wrappers in GUI object properties editor code, like these:
It is far from complete and is probably not the best way to implement it, but shows the idea. Would it be useful to have similar wrappers as a part of visit_struct?
The text was updated successfully, but these errors were encountered: