Преглед на файлове

Adding arithmetic for dimensioned types where multiplication and division should be restricted.

Sam Jaffe преди 7 години
родител
ревизия
cdb47e181c
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      opaque_typedef.hpp

+ 4 - 1
opaque_typedef.hpp

@@ -113,7 +113,10 @@ OPAQUE_TYPE_ASSIGN_OPERATOR(exclusive_or, ^);
 #undef OPAQUE_TYPE_ASSIGN_OPERATOR
 
 template <typename TDef>
-struct numeric_arithmetic : unary_plus<TDef>, unary_minus<TDef>, addition<TDef>, subtraction<TDef>, multiplication<TDef>, division<TDef> {};
+struct dimensional_arithmetic : unary_plus<TDef>, unary_minus<TDef>, addition<TDef>, subtraction<TDef> {};
+
+template <typename TDef>
+struct numeric_arithmetic : dimensional_arithmetic<TDef>, multiplication<TDef>, division<TDef> {};
 
 template <typename TDef>
 struct integer_arithmetic : numeric_arithmetic<TDef>, modulo<TDef> {};