mcpp index

compat.etl

#include

Embedded Template Library — fixed-capacity containers and utilities (header-only)

#include <etl/queue.h>
mcpp add compat.etl@20.49.0

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

// compat.etl — exercise ETL's fixed-capacity containers and their observable
// capacity/ordering behaviour.
#include <etl/queue.h>
#include <etl/vector.h>

int main() {
    etl::vector<int, 4> values;
    values.push_back(3);
    values.push_back(1);
    values.push_back(4);

    if (values.size() != 3 || values.capacity() != 4 ||
        values[0] != 3 || values[2] != 4) {
        return 1;
    }

    etl::queue<int, 4> queue;
    queue.push(10);
    queue.push(20);
    if (queue.front() != 10 || queue.back() != 20) {
        return 2;
    }
// …

tests/examples/etl/tests/containers.cpp · 專案 tests/examples/etl

建置

targets
etl (lib)
language
c++23
C standard
c11
import std
no
include dirs
*/include

原始檔 (1)

  • mcpp_generated/etl_anchor.c

產生的檔案

  • mcpp_generated/etl_anchor.c

版本

版本平台 鏡像sha256
20.49.0 最新 LinuxWindowsmacOS 來源 b3e7a5544795…