physunits
« Back to VersTracker
Description:
C++ header-only for Physics unit/quantity manipulation and conversion
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c++ header-only physics units scientific-computing
Install: brew install physunits
About:
PhysUnits is a header-only C++ library for compile-time dimensional analysis and unit conversion. It enables type-safe manipulation of physical quantities, ensuring unit consistency and preventing errors in scientific calculations. The library leverages C++11 features for zero-overhead abstractions, making it suitable for performance-critical applications.
Key Features:
  • Header-only library requiring no build or installation
  • Compile-time unit checking and conversion for type safety
  • Supports SI units and derived units (e.g., Newton, Joule, Watt)
  • Zero runtime overhead with optimized template metaprogramming
Use Cases:
  • Physics simulations and scientific computing
  • Engineering applications requiring unit safety
  • Embedded systems with strict performance constraints
Alternatives:
  • units – Units library by NVIDIA; similar compile-time safety but with different API design and C++20 focus
  • boost.units – Part of Boost; more feature-rich but heavier dependency and longer compile times
Version History
Detected Version Rev Change Commit
Sep 24, 2025 5:28pm 0 VERSION_BUMP 1e9addf8
Sep 24, 2025 3:49pm 0 VERSION_BUMP d2f32d61