MPark.Variant is an implementation of C++17 std::variant
for C++11/14/17.
The implementation is based on my implementation of std::variant
for libc++ and is continuously tested against libc++'s std::variant
test suite.
New Features
- #56: Replaced the visitation mechanism to be
switch
-based.- Blog post: Variant Visitation V2
- Thank you @quicknir for the contribution and collaboration on this effort!
- Improved visitor same return type error message:
error: static_assert failed due to requirement 'expected<int>::template but_got<double>()'
"`visit` requires the visitor to have a single return type"
- Improved visitor exhaustiveness error message:
error: static_assert failed due to requirement
'visitor<add_ints>::template does not handle<const int &, const int &>()'
"`visit` requires the visitor to be exhaustive"