A cmake deliver version of stanford library, specially patched for CSC3002 students in CUHK(SZ)
- a new sync library is available now. it provides a mutex/rwlock with rust favor and a array queue and a segment queue.
- All the sources are modified from stanford-cpp-library. The original author reserves the copyright.
- We hope you can use a more elegant naming and organizing method. Hence instead of the orignal style like
"gfont.h"
, we adapt a modularized way :<graphics/gfont.h>
- The orginal stanford library mixes files in all modules and produces cyclic dependency relations, therefore, we have to produce to whole shared library, instead of multiple small libraries for each module.
- The original version takes the advantage of
qmake
toolchain and make some renaming aroundmain()
function. Here, we want to seperate the library and user's code. Therefore, we do not use the library itself to do the renaming. Instead, users should write a entry function (saystart
) by themselves and includemacro.h
and call__WRAP_MAIN__(start)
to invoke the library. - The backend of
Map
andHashMap
has been migrated toabsl::btree_map
andabsl::flat_hash_map
to improve the performance. Vast functions instrlib.h
has been refactored into wrappers aroundabsl
to reduce the difficulty of maintenance. Char checking operation now usesstd::memchr
directly instead of self implementing. In most cases, you do not need to care about the changes: they do not require any manual interference on API. - We also bind the library with
mimalloc
, it is more efficient and it can output some debug messages for you, please check environment-options.