I have a small cross-platform C++ library on GitHub.com where I aggregated some reusable components from the projects I worked on. Feel free to clone it and test.
AWL – A Working Library
AWL is a small cross-platform C++ library that includes:
- A simple binary serialization framework.
- Memory stream, buffered stream, hashing stream.
- A set that finds an element by both key and index with O(logN) time.
- A doubly linked list with static insert and erase methods.
- An observable with movable observers.
- A pool of reusable objects managed with std::shared_ptr.
- Bitset based on enum.
- A circular buffer with an interface similar to std::queue.
- And other simple classes like CompositeCompare, ReverseCompare, ScopeGuard, etc…
- A simple testing framework.
Theoretically, the master branch should compile and work with C++20, at least it is periodically built with MSVC 19.29.30040+ and GCC 11, but not with CLang yet.
There is also cpp17 branch that probably compiles with C++17.
Version compatibility is not guaranteed and there is no warranty of any kind.
Feel free to use it or fork it, report a bug by opening an issue.
Compiling on Windows with CMake and MSVC
git clone https://github.com/dmitriano/Awl.git
mkdir build\awl
cd build\awl
cmake.exe ..\..\Awl -DCMAKE_GENERATOR_PLATFORM=x64
set CL=/MP
msbuild AwlTest.sln /p:Configuration=Release /p:Platform=x64
Compiling on Linux with CMake and GCC
git clone https://github.com/dmitriano/Awl.git
mkdir build/awl
cd build/awl
cmake ../../Awl/ -DCMAKE_BUILD_TYPE=Release
make -j2
Running the tests:
AwlTest --filter .*Test
Running the benchmarks:
AwlTest --filter .*Benchmark --output all