Skip to content

Repository files navigation

lt

Lightweight templates for C++ 23.

Containers

ContainerDescription
arrayWrapper around a C array
const_mapConst compile time map
fixed_mapFixed size compile time map
fixed_setFixed size compile time set
fixed_stringFixed size string
fixed_vectorFixed size vector
listIntrusive doubly linked list
pairBasic version of std::pair
spanConst view into a contiguous memory space.
tupleBasic version of std::tuple

Types

TypeDescription
deferCall a callback on scope exit.
eitherA type that is either one type or another type
optionBasic version of std::optional
resultBasic version of std::expected

Macros

MacroDescription
DebugTypeType that is only enabled in debug mode.
debug_funcFunction that is only enabled in debug mode.
FOR_EACHRecursive macro.
testSimple 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

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages