Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 2.21 KB

README.md

File metadata and controls

70 lines (48 loc) · 2.21 KB

MPark.Variant

C++14 implementation of C++17 std::variant

stability travis license gitter wandbox

Introduction

MPark.Variant provides an implementation of C++17 std::variant as a C++14 library.

The implementation is based on my implementation of std::variant for libc++ and is continously tested against libc++'s std::variant test suite.

Documentation

Refer to std::variant - cppreference.com for the std::variant components of MPark.Variant.

CMake Variables

  • MPARK_VARIANT_INCLUDE_TESTS:STRING

    Semicolon-separated list of tests to build. Possible values are mpark and libc++.

    This is "mpark" by default if the library being built directly, and ""by default if it is being built indirectly via add_subdirectory.

    NOTE: The libc++ tests are built with -std=c++1z.

Requirements

This library requires a standard conformant C++14 compiler. The following compilers are continously tested:

  • g++-5.4
  • g++-6.2
  • clang++-3.5
  • clang++-3.6
  • clang++-3.7
  • clang++-3.8
  • clang++-3.9
  • apple-clang-6
  • apple-clang-7
  • apple-clang-8

NOTE: Enabling libc++'s std::variant tests require -std=c++1z support.

Unit Tests

Refer to test/README.md.