In C++11 a static constexpr member variable, unlike every other kind of constexpr global variable, has external linkage, thus must be explicitly defined somewhere.

This flaw is fixed in C++17.
This commit is contained in:
Roman Telezhynskyi 2022-09-15 15:01:45 +03:00
parent 9429be3e0d
commit e160bb02ff

View File

@ -40,6 +40,12 @@
#include "../vmisc/compatibility.h"
#include "../ifc/exception/vexceptionobjecterror.h"
// See https://stackoverflow.com/a/46719572/3045403
#if __cplusplus < 201703L
constexpr qreal VAbstractCurve::minLength; // NOLINT(readability-redundant-declaration)
#endif
//---------------------------------------------------------------------------------------------------------------------
VAbstractCurve::VAbstractCurve(const GOType &type, const quint32 &idObject, const Draw &mode)
:VGObject(type, idObject, mode), d (new VAbstractCurveData())
{}