btl
btl copied to clipboard
Basic Template Library
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_this
and 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
GlobalPtr
to global data (static, gc, ...).
-
btl:string mutable string with small string optimization like c++
std::basic_string
andstd::string
-
BasicString Generalization of struct string with optional small string optimization for min
N
characters of type char, wchar and dchar. -
SmallString Generalization of struct string with small string optimization for min
N
characters 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
N
characters 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::vector
andfolly::small_vector
- Vector sequence container with growable capacity.
-
SmallVector sequence container with growable capacity that implements small buffer optimization for
N
elements. -
FixedVector sequence container with max
N
elements.
-
btl:list (beta) linked list like c++
std::list
andstd::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.