[variant2] Review (comparison with other variants)

Hi,
- What is your evaluation of the design?
Variant2 is very close to the boost::variant and std::variant. The
major difference is in treating very rare border case.
Let me put it very clear:
* I really like the valueless_by_exception() approach of the
std::variant. It gives perfectly determinated result in case of an
exception during variant assignments, does not dynamically allocate
storage and does not double the size of the variant variable.
* The approach of existing boost::variant is not perfect. Exception
during assignment could lead to the default construction of some type
that was not previously held in the variant. This is actually a very
creepy behavior:
variant
- What is your evaluation of the implementation?
Looks great. Enjoyed it.
- What is your evaluation of the documentation?
Did not read very carefully.
- What is your evaluation of the potential usefulness of the library?
Useful only if it will get as good as, or better than std::variant.
- Did you try to use the library? With which compiler(s)? Did you have any problems?
Have not used it.
- How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?
Quick reading.
- Are you knowledgeable about the problem domain?
Yes. I maintain the boost::variant and keep an eye on std::variant implementations. Conclusion: I would recommend to REJECT the Variant2 library in it's current state. My opinion would change if the underlying design changes in favor of explicit valueless_by_exception() state. -- Best regards, Antony Polukhin
participants (1)
-
Antony Polukhin