Registry / utility / mpark-variant

mpark-variant

JSON →
library1.4.0vcpkgunverified

An implementation of C++17 std::variant for C++11/14/17.

vcpkg install mpark-variant
INSTALL
IMPORT
SIG · MPARK-VARIANT
M
mpark-variant
utilitycppv1.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mpark/variant.hpp
#include <mpark/variant.hpp>

Use mpark::variant as a type-safe union.

#include <mpark/variant.hpp> #include <iostream> int main() { mpark::variant<int, double> v = 42; std::cout << mpark::get<int>(v) << std::endl; v = 3.14; std::cout << mpark::get<double>(v) << std::endl; return 0; }
Debug
Known issues
gotchaHeader-only library; no linking required.
fix
Just include the header; no CMake target needed if using header-only mode.
affects: all
Upgrade
Version history
1.4.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources

No resource links recorded.

mpark-variant — pip install mpark-variant · libregistry