I've designed a class InputField
having a constructor with 2 parameters : explicit InputField(InputFieldIndex uiIndex, QString sName) noexcept;
I store this class in a QVector
, so, unfortunately, I have to add a default-contructor. In term of software design, that's not good for me (because I have a constraint on uiIndex
).
Is there a way to only allow to QT (QVector
in my case) to call the default constructor? A macro or a preprocessor instruction?