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… |