Btl
Basic Template Library
Install / Use
/learn @submada/BtlREADME
Basic Template Library
About
This is colection of packages:
- btl:autoptr: smart pointers like c++
std::shared_ptr,std::weak_ptr,std::enable_shared_from_thisand more.- SharedPtr reference counted pointer with support for aliasing and optional weak pointer support.
- RcPtr reference counted pointer with limited support for aliasing (but small size and lock free manipulation of pointer) and optional weak pointer support.
- IntrusivePtr reference counted pointer with reference counting inside of managed object with limited support for aliasing (but small size and lock free manipulation of pointer) and optional weak pointer support.
- UniquePtr non copyable owning pointer that owns and manages object through a pointer and disposes of that object when goes out of scope.
- GlobalPtr (beta) non-owning pointer
GlobalPtrto global data (static, gc, ...).
- btl:string mutable string with small string optimization like c++
std::basic_stringandstd::string- BasicString Generalization of struct string with optional small string optimization for min
Ncharacters of type char, wchar and dchar. - SmallString Generalization of struct string with small string optimization for min
Ncharacters of type char, wchar and dchar. - LargeString Generalization of struct string without small string optimization for characters of type char, wchar and dchar.
- FixedString Generalization of struct string with max
Ncharacters of type char, wchar and dchar. - String alias to
BasicString!char.
- BasicString Generalization of struct string with optional small string optimization for min
- btl:vector dynamic array like c++
std::vectorandfolly::small_vector- Vector sequence container with growable capacity.
- SmallVector sequence container with growable capacity that implements small buffer optimization for
Nelements. - FixedVector sequence container with max
Nelements.
- btl:list (beta) linked list like c++
std::listandstd::forward_list- List sequence container - bidirectional linked list.
- ForwardList sequence container - single linked list.
Documentation
- https://submada.github.io/btl
Code
- https://github.com/submada/btl
- https://gitlab.com/submada/btl
Package
- https://code.dlang.org/packages/btl
History
This repository was in past divided into 3 repositories: autoptr, small-vector and basic-string but they shared many internal parts so I unite them under one.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
