Closed martinmoene closed 6 years ago
I've got some thoughts, related to code generation. And here is one significant problem: there is (or I see?) no way to make uniform visit
signature for C++98/03 and C++11 etc. In the first case you have to explicitly declare visitor return type. In the second case you can (somehow) calculate it from the visitor.
Above bullets should have conveyed the message a split between C++98 and C++11 is perhaps to be made.
That may not solve your acute problem, but would be merely the result of the attention being drawn to visit
.
I suppose I know how to implement all this stuff.
Show it off ;)
Still a week to come near a usable computer. Working from phone right now enabling merging good pull requests (GPRS ;)
Show it off ;)
No problem. :) That's the prototype of implementation. It's needed to be checked, generalized and so on. But before I need the review regarding to coding style, naming etc. you take care of. Also I'm considering about perfect forwarding here and more test cases.
https://github.com/flexferrum/variant-lite/commit/e877e597616e4cdd1b49a732400010a37938ab68
Implemented per PR #11, continued in issue #12
From PR #8, @flexferrum
variant visit, cppreference: