Write some lightweight gadgets to eXtend STL ...
- progress.h: display progress bar in terminal
- singleton.h: a base template class of singleton (thread-safe)
- os.h: macros about platform/compiler
- cast.h: casting between different pointer types or endians
- argparse.h: command line argument parser
- style.h: set output style of
std::ostream
- guard.h: do something when leaving current block (used to generate type info and IR in TinyLang, combining with visitor pattern)
- nested.h: nested map, supported recursive lookup
- bitvalue.h: bit extraction/concatenation, can be used in both runtime and compile time
- bitpat.h: bitwise pattern match
- embed.h: embedding text file into C++ as a null-terminated char array
We do not recommend you to use the following gadgets in your project since they are too shabby:
- raii.h: using RAII to release resources automatically
- str_hash.h: get the hash value of a string constant while compile time
- argh.h: parse command line arguments
- gc/gc.h: using reference counting and mark-and-sweep garbage collecting techniques to release resources, you can use it just like using
std::shared_ptr
! - range.h: can be used in a range-based for loop, like 'range()' in Python
See examples directory.
C++17 required.
Copyright (C) 2010-2020 MaxXSoft. License MIT.