百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

Bedrock

> 编程语言
开源

最小的 C++20 STL 替代库。更简单、更小,在许多情况下更快。

186 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

最小的 C++20 STL 替代库。更简单、更小,在许多情况下更快。

Bedrock

Bedrock is a C++20 STL alternative. Smaller, simpler, in many case faster. It's a hobby project, don't expect much more than an interesting implementation reference for things.

Currently Windows only. Supports MSVC and Clang. There are no concrete plans to support more platforms/compilers at this time.

Containers and Views

cpp
Vector         // Roughly equivalent to std::vector, with extra useful methods (Find, SwapErase, etc.)
Span           // Roughly equivalent to std::span
String              // Roughly equivalent to std::string
StringView          // Roughly equivalent to std::string_view
HashMap   // Dense open addressed (Robin Hood) hash map. Key-value pairs are stored contiguously.
HashSet        // Same as HashMap, but without values.

Allocators

All containers come in different allocator flavors:

cpp
TempVector     // Allocates from a thread local arena. Falls back to the heap if it runs out.
FixedVector    // Allocates from a fixed-size arena embedded in the container.
VMemVector     // Allocates from a virtual memory arena embedded in the container. Can grow while keeping a stable address.
ArenaVector    // Allocates from an externally provided arena.

Tests

Write tests anywhere:

cpp
REGISTER_TEST("Span")
{
    int values[] = { 1, 2, 3, 4, 5 };
    Span test = values;

    Span first_two = test.First(2);
    TEST_TRUE(first_two.Size() == 2);
    TEST_TRUE(first_two[0] == 1);
    TEST_TRUE(first_two[1] == 2);
};

The run them with gRunAllTests().

Other

Mutex, Atomic, Thread, Semaphore. Function, many Type Traits, a few Algorithms...

Building

Compile every cpp file in Bedrock/. Define ASSERTS_ENABLED if you want asserts and tests. That's about it.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++allocatorsatomiccppcpp20

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言