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 committed 2021-04-06 13:33:27 +02:00
1 parent a954f5d924
commit c3659dbb47
92 files changed
+181 -185

No files matched your search

+1 -3
View File
@@ -55,9 +55,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
)
endif()
if(UNITS_UDLS)
target_compile_definitions(mp-units-core INTERFACE UNITS_UDLS=1)
endif()
target_compile_definitions(mp-units-core INTERFACE $<$<BOOL:${UNITS_LITERALS}>:UNITS_LITERALS>)
if(DEFINED UNITS_DOWNCAST_MODE)
set(downcast_mode_options OFF ON AUTO)
+2 -2
View File
@@ -43,7 +43,7 @@ concept Angle = QuantityOfT<T, dim_angle>;
template<UnitOf<dim_angle<>> U, Representation Rep = double>
using angle = quantity<dim_angle<>, U, Rep>;
#if UNITS_UDLS
#ifdef UNITS_LITERALS
inline namespace literals {
@@ -53,7 +53,7 @@ constexpr auto operator"" _q_rad(long double l) { return angle<radian, long doub
} // namespace literals
#endif // UNITS_UDLS
#endif // UNITS_LITERALS
namespace references {