From 172fa74239d3c331e0b805e58f310da1792b9d40 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 12 Feb 2020 09:50:07 +0100 Subject: [PATCH] gigaelectronvolt added --- src/include/units/physical/si/energy.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/include/units/physical/si/energy.h b/src/include/units/physical/si/energy.h index 23c9c847..d7a1a842 100644 --- a/src/include/units/physical/si/energy.h +++ b/src/include/units/physical/si/energy.h @@ -36,6 +36,7 @@ struct megajoule : prefixed_unit {}; struct gigajoule : prefixed_unit {}; struct electronvolt : named_scaled_unit, joule> {}; +struct gigaelectronvolt : prefixed_unit {}; struct dim_energy : physical::dim_energy {}; @@ -68,6 +69,10 @@ constexpr auto operator""GJ(long double l) { return energy(l); } constexpr auto operator""eV(long double l) { return energy(l); } +// GeV +constexpr auto operator""GeV(unsigned long long l) { return energy(l); } +constexpr auto operator""GeV(long double l) { return energy(l); } + } // namespace literals } // namespace units::si