refactor: added preprocessor branch for downcast_mode OFF code

This commit is contained in:
Mateusz Pusz
2020-09-12 21:21:45 +02:00
parent a19c97fe85
commit 57548fdb24

View File

@@ -28,6 +28,8 @@
namespace units {
// DimensionOfT
#if DOWNCAST_MODE == 0
namespace detail {
template<typename Dim, template<typename...> typename DimTemplate>
@@ -41,6 +43,8 @@ inline constexpr bool same_exponents_of<unknown_dimension<Es...>, DimTemplate> =
template<typename Dim, template<typename...> typename DimTemplate>
concept EquivalentUnknownDimensionOfT = Dimension<Dim> && is_derived_from_specialization_of<Dim, unknown_dimension> && detail::same_exponents_of<Dim, DimTemplate>;
#endif
template<typename Dim, template<typename...> typename DimTemplate>
concept DimensionOfT = Dimension<Dim> && (is_derived_from_specialization_of<Dim, DimTemplate>
#if DOWNCAST_MODE == 0