Skip to content

v1.4.0

Latest
Compare
Choose a tag to compare
@mpark mpark released this 15 Jan 11:29
· 17 commits to master since this release
4988879

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.
  • 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"

Bug Fixes

  • Relational operators must return a type implicitly convertible to bool.
  • #34: Support for pointers to incomplete types
  • #41: Crash under MSVC (VS 2015 update 3)
  • Visual Studio 2017 related issues:
    • #48: Fails to compile with MSVC 19.15
    • #49: Disable MPARK_CPP14_CONSTEXPR for MSVC <= 19.15
    • #55: Compilation failed in Visual Studio 2017
    • #57: Use constexpr compiler bug workaround for VS2017 version 15.9