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.
Feel free to use it or fork it, but keep in mind that version compatibility is not guaranteed and there is no warranty of any kind.
Theoretically, the master branch should compile and work at least with MSVC 2017 and GCC 9 and above.
Compiling on Windows with CMake and MSVC2017
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 9:
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