compat.yaml-cpp
#includeyaml-cpp — YAML 1.2 parser and emitter for C++ (static)
#include <yaml-cpp/yaml.h>
mcpp add compat.yaml-cpp@0.9.0
Usage
From this repository's own test project — built and run by CI, not written for the website.
// Behavioral test for compat.yaml-cpp 0.8.0 -- the same checks as
// tests/examples/yaml-cpp (0.9.0) minus the float formatting 0.9.0 added.
//
// Each check reaches symbols defined in the package's own .cpp files, so a
// package that compiled nothing cannot pass by being header-only by accident:
//
// YAML::Load, node access, conversions -> parse.cpp, node_data.cpp, convert.cpp
// anchors and aliases -> nodebuilder.cpp, singledocparser.cpp
// YAML::LoadAll -> parse.cpp, parser.cpp
// YAML::Emitter, YAML::Dump -> emitter.cpp, emitterstate.cpp, emit.cpp
// malformed input -> scanner.cpp, exceptions.cpp
// YAML::BuildGraphOfNextDocument -> contrib/graphbuilder*.cpp
//
// Returns non-zero on any mismatch.
#include <yaml-cpp/yaml.h>
#include <yaml-cpp/contrib/graphbuilder.h>
#include <cstdio>
#include <sstream>
#include <string>
#include <vector>
// …
tests/examples/yaml-cpp-v080/tests/yaml.cpp · project tests/examples/yaml-cpp-v080
openkal
| target | result | environment | test project | first diagnostic |
|---|---|---|---|---|
| x86_64-linux-gnu | runs | posix | yaml-cpp | |
| x86_64-windows-musl | runs | posix | yaml-cpp |
How this was measured
Measured 2026-09-23 by tests/openkal/compat.py with openkal-llvm-runtime 0.15.1, llvm@22.1.8, mcpp 2026.9.21.3. The test project selects no platform dependency of its own. The badge above is a summary of the strictest measured target -- the table above states each target's own environment.
Build
- targets
yaml-cpp (lib)- language
c++23- import std
- no
- include dirs
mcpp_generated, */include
Sources (2)
*/src/*.cpp*/src/contrib/*.cpp
Generated files
mcpp_generated/yaml-cpp/dll.h