feat: unit symbols added for CGS

This commit is contained in:
Mateusz Pusz
2022-12-04 15:05:29 +01:00
parent d9b227ad30
commit fa34d0120b

View File

@@ -29,8 +29,8 @@ namespace units::si::cgs {
// clang-format off
inline constexpr struct centimetre : si::centi_<si::metre> {} centimetre;
inline constexpr struct gram : si::gram {} gram;
inline constexpr struct second : si::second {} second;
inline constexpr struct gram : decltype(si::gram) {} gram;
inline constexpr struct second : decltype(si::second) {} second;
inline constexpr struct gal : named_unit<"Gal", centimetre / square<second>> {} gal;
inline constexpr struct dyne : named_unit<"dyn", gram * centimetre / square<second>> {} dyne;
inline constexpr struct erg : named_unit<"erg", dyne / centimetre> {} erg;
@@ -40,4 +40,17 @@ inline constexpr struct stokes : named_unit<"St", square<centimetre> / second> {
inline constexpr struct kayser : decltype(1 / centimetre) {} kayser;
// clang-format on
namespace unit_symbols {
inline constexpr auto cm = centimetre;
inline constexpr auto g = gram;
inline constexpr auto s = second;
inline constexpr auto Gal = gal;
inline constexpr auto dyn = dyne;
inline constexpr auto Ba = barye;
inline constexpr auto P = poise;
inline constexpr auto St = stokes;
} // namespace unit_symbols
} // namespace units::si::cgs