mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
Merge pull request #459 from HazardyKnusperkeks/macro
Work around Windows macro
This commit is contained in:
@ -45,7 +45,16 @@ inline constexpr struct radian : named_unit<"rad", metre / metre, kind_of<isq::a
|
||||
inline constexpr struct steradian : named_unit<"sr", square<metre> / square<metre>, kind_of<isq::solid_angular_measure>> {} steradian;
|
||||
inline constexpr struct hertz : named_unit<"Hz", 1 / second, kind_of<isq::frequency>> {} hertz;
|
||||
inline constexpr struct newton : named_unit<"N", kilogram * metre / square<second>> {} newton;
|
||||
#ifdef pascal
|
||||
#pragma push_macro("pascal")
|
||||
#undef pascal
|
||||
#define UNITS_REDEFINE_PASCAL
|
||||
#endif
|
||||
inline constexpr struct pascal : named_unit<"Pa", newton / square<metre>> {} pascal;
|
||||
#ifdef UNITS_REDEFINE_PASCAL
|
||||
#pragma pop_macro("pascal")
|
||||
#undef UNITS_REDEFINE_PASCAL
|
||||
#endif
|
||||
inline constexpr struct joule : named_unit<"J", newton * metre> {} joule;
|
||||
inline constexpr struct watt : named_unit<"W", joule / second> {} watt;
|
||||
inline constexpr struct coulomb : named_unit<"C", ampere * second> {} coulomb;
|
||||
|
Reference in New Issue
Block a user