Move template in-class function definitions out of class

Keeping them defined in-class caused linker issues with the extern template
declaration in a non-optimized MinGW debug build. Apparently it did not
inline them but instead relied on the extern declaration and expected
them defined somewhere else.
This commit is contained in:
Roland Winklmeier
2018-08-29 16:24:43 +02:00
committed by Klaus Basan
parent 5ac7c224bf
commit 29f464189b
6 changed files with 28 additions and 4 deletions

View File

@@ -41,6 +41,18 @@ namespace BlackMisc
{
namespace PhysicalQuantities
{
template <class MU, class PQ>
const MU & CPhysicalQuantity<MU, PQ>::getUnit() const
{
return m_unit;
}
template <class MU, class PQ>
void CPhysicalQuantity<MU, PQ>::setUnit(const MU &unit)
{
m_unit = unit;
}
template <class MU, class PQ>
void CPhysicalQuantity<MU, PQ>::setUnitBySymbol(const QString &unitName)
{