Skip to content
/ variant Public
forked from mpark/variant

Variant: Discriminated Union with Value Semantics

License

Notifications You must be signed in to change notification settings

os12/variant

 
 

Repository files navigation

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.

About

Variant: Discriminated Union with Value Semantics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.4%
  • CMake 5.0%
  • Shell 0.6%