made derived() private instead of protected in CRTP

This commit is contained in:
Mathew Sutcliffe
2013-04-30 20:12:47 +01:00
parent ad6ac0186b
commit e5afc2c627
3 changed files with 48 additions and 48 deletions

View File

@@ -20,17 +20,7 @@ namespace Math
*/
template<class ImplMatrix, int Rows, int Columns> class CMatrixBase : public BlackMisc::CBaseStreamStringifier<ImplMatrix>
{
protected:
// no bug, Qt expects columns rows
QGenericMatrix<Columns, Rows, double> m_matrix; //!< backing data
/*!
* \brief Conversion to string
* \return
*/
QString stringForConverter() const;
private:
/*!
* \brief Easy access to derived class (CRTP template parameter)
* \return
@@ -49,6 +39,16 @@ protected:
return static_cast<ImplMatrix *>(this);
}
protected:
// no bug, Qt expects columns rows
QGenericMatrix<Columns, Rows, double> m_matrix; //!< backing data
/*!
* \brief Conversion to string
* \return
*/
QString stringForConverter() const;
public:
/*!
* \brief Default constructor