nothings / single_file_libs

List of single-file C/C++ libraries.
8.86k stars 585 forks source link

CLM_LIBS a collection of libraries in a single header file #198

Open CarlosLunaMota opened 4 years ago

CarlosLunaMota commented 4 years ago

Please, consider including CLM_LIBS.h in your list.

CLM_LIBS.h is a single file containing several code-generating macros. Each macho generates all the code and the data-types of a single library:

Although everything (license, code and documentation for all the libraries) is included in a single header file, each library (indeed, each function) is independent from the others, so the final users may erase the macros (or functions!) that are not used in their code. This being said, since these are code-generating macros, no code is generated at all until you explicitly import one of these libraries, so there is no downside of including several libraries in a single header file.

CLM_LIBS.h relies just in the C standard library. CLM_LIBS.h is released into the Public Domain using the unlicense. CLM_LIBS.h has not been tested yet with C++ code but, to the best of my knowledge, nothing precludes using these libraries in C++ (although most of them make no sense in that language because there may be better alternatives in the C++'s standard library).