FOSSredder 0.5.0
Loading...
Searching...
No Matches
MoneyAmount.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <cmath>
9
10namespace core::domain {
11
13public:
14 double value() const noexcept;
15
16 MoneyAmount() = default;
21 explicit MoneyAmount(double value);
22
28 static bool isValid(double value) noexcept {
29 return std::isfinite(value);
30 }
31private:
32 double value_ = 0.0;
33};
34
35} // namespace core::domain
static bool isValid(double value) noexcept
Checks whether a raw amount is finite.
Definition MoneyAmount.h:28
double value() const noexcept