mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 04:44:27 +02:00
my_value constructor refactored
This commit is contained in:
@@ -36,7 +36,7 @@ namespace {
|
|||||||
T value_{};
|
T value_{};
|
||||||
public:
|
public:
|
||||||
my_value() = default;
|
my_value() = default;
|
||||||
constexpr my_value(T v) : value_{std::move(v)} {}
|
constexpr my_value(T v) : value_(std::move(v)) {}
|
||||||
constexpr my_value& operator+=(const my_value& other) { value_ += other.value_; return *this; }
|
constexpr my_value& operator+=(const my_value& other) { value_ += other.value_; return *this; }
|
||||||
constexpr my_value& operator-=(const my_value& other) { value_ -= other.value_; return *this; }
|
constexpr my_value& operator-=(const my_value& other) { value_ -= other.value_; return *this; }
|
||||||
constexpr my_value& operator*=(const my_value& other) { value_ *= other.value_; return *this; }
|
constexpr my_value& operator*=(const my_value& other) { value_ *= other.value_; return *this; }
|
||||||
|
Reference in New Issue
Block a user