Skip to content

dementive/lt

Repository files navigation

lt

Lightweight templates for C++ 23.

Containers

Container Description
array Wrapper around a C array
const_map Const compile time map
fixed_map Fixed size compile time map
fixed_set Fixed size compile time set
fixed_string Fixed size string
fixed_vector Fixed size vector
list Intrusive doubly linked list
pair Basic version of std::pair
span Const view into a contiguous memory space.
tuple Basic version of std::tuple

Types

Type Description
defer Call a callback on scope exit.
either A type that is either one type or another type
option Basic version of std::optional
result Basic version of std::expected

Macros

Macro Description
DebugType Type that is only enabled in debug mode.
debug_func Function that is only enabled in debug mode.
FOR_EACH Recursive macro.
test Simple testing framework using recursive macros.

Features

  • No dynamic memory allocation

  • No exceptions

  • No rtti

  • Almost everything is constexpr

  • The only standard library headers used are: <new>, <stddef.h>, and <initializer_list>.

  • Compiles cleanly with -Wall -Wextra -Wpedantic -Wshadow and all sanitizers.

Credits

The tuple and list were adapted from the Tuple and SelfList from Godot.

snprintf from stb

About

Lightweight C++ 23 Templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published