Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
Loading...
Searching...
No Matches
units::literals Namespace Reference

namespace for unit literal definitions of all categories. More...

Functions

constexpr decibels< double > operator""_dB (long double d) noexcept

Detailed Description

namespace for unit literal definitions of all categories.

Literals allow using unit values by suffixing numbers. For example, a value of meter_t<double>(6.2) could be used as 6.2_m. All literals use an underscore followed by the abbreviation for the unit. To enable literal syntax in your code, include the statement using namespace units::literals;.

See also
See unit for more information on unit type containers.