Skip to content

99syl/cutile

Repository files navigation

cutile

This is the toolbox I use when writing C or C++ code.

It should compile on any compiler compatible with C11 or C++20.

No build scripts/tools will be provided because it is not needed ! You just need to include this library in your C/C++ project !

Interfaces and implementations are provided in the same .h file.
The word "interface" refers to any function, struct, variable, preprocessor macro declaration. The word "implementation" refers to any function implementation.
By default, including a .h will just provide you the interface unless you define "CUTILE_IMPLEM" before, then the implementation will also be provided. Those rules might not be followed everywhere (e.g. inline functions): the interface and the implementation will be provided by default, with or without predefining "CUTILE_IMPLEM".

Example:

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    #define CUTILE_IMPLEM
    #include "cutile/str.h"
    // Both interface and implementation are made available here.
    
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    #include "cutile/str.h"
    // Only interface is made available here
    
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^

    For example, you can have one source file that serves the purpose of building the cutile implementations you need.

About

Bunch of stuff I often use in C/C++ projects

Topics

Resources

License

Stars

Watchers

Forks