aboutsummaryrefslogtreecommitdiff
path: root/src/operation/math.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/operation/math.h')
-rw-r--r--src/operation/math.h40
1 files changed, 16 insertions, 24 deletions
diff --git a/src/operation/math.h b/src/operation/math.h
index 64a5cdb..82740b6 100644
--- a/src/operation/math.h
+++ b/src/operation/math.h
@@ -9,45 +9,37 @@ template <
typename X,
typename Y
>
-struct add {
- typedef std::integral_constant<
- decltype(X::value + Y::value),
- X::value + Y::value
- > type;
-};
+using add = typename std::integral_constant<
+ decltype(X::value + Y::value),
+ X::value + Y::value
+>::type;
template <
typename X,
typename Y
>
-struct substract {
- typedef std::integral_constant<
- decltype(X::value - Y::value),
- X::value - Y::value
- > type;
-};
+using substract = typename std::integral_constant<
+ decltype(X::value - Y::value),
+ X::value - Y::value
+>::type;
template <
typename X,
typename Y
>
-struct multiply {
- typedef std::integral_constant<
- decltype(X::value * Y::value),
- X::value * Y::value
- > type;
-};
+using multiply = typename std::integral_constant<
+ decltype(X::value * Y::value),
+ X::value * Y::value
+>::type;
template <
typename X,
typename Y
>
-struct divide {
- typedef std::integral_constant<
- decltype(X::value / Y::value),
- X::value / Y::value
- > type;
-};
+using divide = typename std::integral_constant<
+ decltype(X::value / Y::value),
+ X::value / Y::value
+>::type;
}