Cpp Utilities 1.2.3
Cpp Utilities

Introduction

The Cpp Utilities repository provides many useful functionalities.
All codes are written header-only, so no compile-export-import-link is needed, just use git-submodule to add to your project and include whatever .hpp files you need.

Modules

Dimensional Analysis
Helpr classes, typedefs and functions for dimensional analyse.
Memory Safety
Helper classes, typedefs and functions for memroy safety.
Containers
Classes and functions for some convenient containers.

Files

  • Common.h Macros defined for utilities.
  • DimensionalAnalysis/
    • DimensionalAnalysis.hpp Functionalities for dimensional analysis, guaranteed by strong type, and provides zero-cost abstraction.
    • Ratios.hpp Functionalities for ratio calculation, such as generating approximiate fraction from decimals.
  • MemorySafety/
    • RWSpinLock.hpp A extremely high-performance read-write-spinlock imported from folly library.
    • SafeSharedPtr.hpp Classes wrapped from std::shared_ptr / std::weak_ptr and std::enable_shared_from_this to provide thread-safety while operating the underlying pointer.
  • Containers/
    • SequencialMap.hpp Key-value container behaves like std::map, but extended with random-access operations and traverses in the sequence order of value appends like std::vector.