refactor: UNITS_UDLS renamed to UNITS_LITERALS

Also now the existence of the preprocessor flag is enough to trigger the feature (`#ifdef` instead of `#if`)
This commit is contained in:
Mateusz Pusz
2021-04-06 13:33:27 +02:00
parent a954f5d924
commit c3659dbb47
92 changed files with 181 additions and 185 deletions
+3 -3
View File
@@ -87,7 +87,7 @@ User Defined Literals
Alternatively, to construct quantities with compile-time known values the library provides
:abbr:`UDL (User Defined Literal)` s for each :term:`unit` of every :term:`dimension`::
#if UNITS_UDLS
#ifdef UNITS_LITERALS
inline namespace literals {
@@ -99,11 +99,11 @@ Alternatively, to construct quantities with compile-time known values the librar
}
#endif // UNITS_UDLS
#endif // UNITS_LITERALS
Thanks to them the same code can be as simple as::
#define UNITS_UDLS 1
#define UNITS_LITERALS
using namespace units::isq::si::literals;
auto d = 123._q_km; // si::length<si::kilometre, long double>