diff --git a/src/blackmisc/pqphysicalquantity.cpp b/src/blackmisc/pqphysicalquantity.cpp index 436ad1624..27fcb2769 100644 --- a/src/blackmisc/pqphysicalquantity.cpp +++ b/src/blackmisc/pqphysicalquantity.cpp @@ -20,6 +20,16 @@ namespace BlackMisc // void } + /* + * Copy constructor + * (The implicitly generated copy constructor would suffice, but for what seems to be a bug in MSVC2010 template instantiation) + */ + template CPhysicalQuantity::CPhysicalQuantity(const CPhysicalQuantity &other) : + m_value(other.m_value), m_unit(other.m_unit) + { + // void + } + /* * Equal operator == */ diff --git a/src/blackmisc/pqphysicalquantity.h b/src/blackmisc/pqphysicalquantity.h index 841a6cdaf..18ce23f68 100644 --- a/src/blackmisc/pqphysicalquantity.h +++ b/src/blackmisc/pqphysicalquantity.h @@ -61,6 +61,12 @@ namespace BlackMisc */ CPhysicalQuantity(double value, const MU &unit); + /*! + * \brief Copy constructor + * \param other + */ + CPhysicalQuantity(const CPhysicalQuantity &other); + /*! * \brief Rounded value as string * \param i18n