yandere-chan.binary_tree
importIntrusive and owning binary tree library, with C++23 module wrappers
import binary_tree;
模块名读自上游 src/binary_tree.cppm 里的 `export module` 声明。
mcpp add yandere-chan.binary_tree@0.1.4
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// 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 · 项目 tests/examples/binary_tree-module
构建 · 上游清单
- modules
binary_tree- targets
binary_tree (lib)- language
c++23- manifest version
0.1.4- 来源
https://raw.githubusercontent.com/YandereChan2/binary_tree/0.1.4/mcpp.toml
版本
| 版本 | 平台 | 镜像 | sha256 |
|---|---|---|---|
0.1.4 最新 |
LinuxWindowsmacOS | 源站 | e7bd88adaa15… |