1
0
Fork
You've already forked llmt
0
A library to build libraries
  • C++ 91.4%
  • CMake 6.1%
  • Meson 2.5%
Find a file
2026年04月28日 20:13:27 +03:00
cmake Improve cmake dependency handling 2025年11月28日 12:37:39 +02:00
extras Provide llmt-git.wrap 2025年11月13日 16:28:02 +02:00
include/llmt Make function_traits work with more callable types 2026年04月28日 20:13:27 +03:00
subprojects Use full commit hash for cpp-test-helpers.wrap 2025年11月27日 13:34:07 +02:00
tests Make function_traits work with more callable types 2026年04月28日 20:13:27 +03:00
CMakeLists.txt Add raw test bin, bump version 2026年04月21日 17:10:55 +03:00
LICENCE.md License with Apache 2.0 with LLVM Exceptions 2025年11月13日 07:53:22 +02:00
meson.build Add super simple function traits class 2026年04月28日 18:03:52 +03:00
meson.options Finish basic project structure 2025年08月01日 20:01:44 +03:00
README.md Rel 0.1.0 cleanup 2025年11月21日 13:56:28 +02:00

Library metatoolkit

This is a library to build libraries.

Configuration macroes

llmt allows some configuration of how it works via preprocessor definitions

definition default value notes
LLMT_NAMESPACE llmt the namespace used by the llmt library
LLMT_FREESTANDING can be defined to build as freestanding, defined by default if __STDC_HOSTED__ == 0
LLMT_DEFAULT_ALLOCATOR std::allocator* default allocator to use with allocator-aware functionality, undefined in freestanding
LLMT_BOUNDS_ERROR(msg) LLMT_TRAP(msg) can be defined to customise behaviour in case of bounds error
LLMT_BAD_ACCESS(msg) throw std::logic_error(msg) can be defined to customise behaviour in case of bad access, will be LLMT_TRAP(msg) by default if exceptions are disabled
LLMT_ALLOCATION_FAILURE(msg) LLMT_TRAP(msg) can be defined to customise behaviour in case of an allocation failure
LLMT_DISABLE_COMPILER_BUILTIN_POPCOUNT can be defined to disable use of compiler-builtin popcount

If a custom handler for allocation failure is set, it is possible to #define LLMT_NOTHROW_ALLOCATION_FAILURE to tell the library that allocation failures do not throw.

How to use

With meson

llmt uses meson as its main build system. extras subdirectory contains wrap files for each release and a llmt-git.wrap that can be used for the HEAD version.

With CMake

If you use cmake, llmt also includes CMakeLists.txt, and exports llmt::llmt target. It is probably most easily used with CMake FetchContent, llmt uses it internally to fetch doctest to build unit tests.

CMakeLists.txt are not guaranteed to be up to date in non-release versions. Release tag CMakeLists should be up to date.