mcpp index

yandere-chan.binary_tree

import

Intrusive and owning binary tree library, with C++23 module wrappers

import binary_tree;

Module name read from the upstream `export module` declaration in src/binary_tree.cppm.

mcpp add yandere-chan.binary_tree@0.1.4

Usage

From this repository's own test project — built and run by CI, not written for the website.

// yandere-chan.binary_tree module-package end-to-end assertion: consume the
// library by import only (no `#include` of its headers, no include path setup).
//
//   * `import binary_tree;`                 — the lib root, re-exporting all three
//   * `import Yc.binary_tree;`              — owning, no parent pointer
//   * `import Yc.parent_aware_binary_tree;` — owning, with parent pointers
//   * `import Yc.intrusive_binary_tree;`    — intrusive node hooks
//
// Every check increments `failures`; the process exits non-zero when a check
// does not hold, which is what makes this a test rather than a sample.

import Yc.intrusive_binary_tree;
import Yc.binary_tree;
import Yc.parent_aware_binary_tree;
import binary_tree;

int main()
{
    int failures = 0;
    auto check = [&failures](bool ok) { if (!ok) { ++failures; } };

    // Owning tree without parent pointers.
// …

tests/examples/binary_tree-module/tests/binary_tree_module.cpp · project tests/examples/binary_tree-module

Build · upstream manifest

modules
binary_tree
targets
binary_tree (lib)
language
c++23
manifest version
0.1.4
source
https://raw.githubusercontent.com/YandereChan2/binary_tree/0.1.4/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
0.1.4 latest LinuxWindowsmacOS source e7bd88adaa15…