lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] valyuta/005 2712277 02/10: Default class currency's


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/005 2712277 02/10: Default class currency's special member functions
Date: Thu, 21 Jan 2021 17:48:15 -0500 (EST)

branch: valyuta/005
commit 2712277462b7d6cf2088e5366fa1ab2e48f2780f
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Default class currency's special member functions
    
    See:
      https://lists.nongnu.org/archive/html/lmi/2021-01/msg00014.html
---
 currency.hpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/currency.hpp b/currency.hpp
index 45f6e2f..f2a7dea 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -75,8 +75,11 @@ class LMI_SO currency
   public:
     using data_type = double;
 
-//  currency() : m_ {0} {} // CURRENCY !! prevents "constexpr currency zero 
{};"
     currency() = default;
+    currency(currency const&) = default;
+    currency& operator=(currency const&) = default;
+    ~currency() = default;
+
     explicit currency(data_type z, raw_cents) : m_ {z} {assert_integral(z);}
 
     currency& operator+=(currency z) {m_ += z.m_; return *this;}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]