c++ - C2663 - unable to see const vs nonConst issue -


I get a C2663 error when compiling the following code. A search on SO shows that C2663 indicates a const / non-const mismatch, but I can not see this problem in my code.

Low code that still reproduces the error

  template & lt; Class QType & gt; Class Cubond {public: Qtype xMinVal, xMaxVal, xValStep, xCurrVal; }; Class QBounds {Buddy Club QBoundsHolder; Public: Add Zero (const std :: string and XP, Constant double XMIN, Const Double XMX, CUST.Double Expose); Add Zero (const std :: string and xp, configure unsigned int xMin, Configure unsigned int xMax, Configure unsigned int xStep); Zero plus (const std :: string & xp, const int xMin, const int xMax, const int xStep); Private: std :: vector & lt; QBound & lt; Double & gt; & Gt; XParametersDouble; Std :: vector & lt; QBound & lt; Unsigned int & gt; & Gt; XParametersUint; Std :: vector & lt; QBound & LT; Integer & gt; & Gt; XParametersInt; }; Class QMultiBounds {Buddy Class QBoundsHolder; Public: Add Zero (const std :: string and xI, const std :: string and xp, const double xmin, const double xmax, const double xStep); Add Zero (const std :: string and xI, const std :: string and xp, configure unsigned int xM, configure unsigned int xMax, configure unsigned int xStep); Zero plus (const std :: string and xI, const std :: string and xp, const int xin, const int xmax, const int xStep); Private: std :: vector & lt; Std :: pair & lt; Std :: string, QBounds & gt; & Gt; XData; }; Class QBoundsHolder {Public: Templates & lt; Class QType & gt; Zero plus (const std :: string & xp, const qtype xMin, const QType xMax, const QType xStep); Private: QMultiBounds xParams; }; Template & lt; Class QType & gt; Inline Zero QBoundsHolder :: add (const std :: string and xp, const qtype xMin, const qtype xmax, const qtype xStep) {this-> XParams [0] .second.add (xP, xMin, xMax, xStep); };  

The error is located on the last line (i.e. this-> xParams [0] ... )

Any help is greatly appreciated, Daniel

A link for the least favorable solution that reproduces the PS problem

QMultiParameterBounds :: operator [] returns const std :: pair and lt; Std :: string, QParameterbounds & gt; , but QParameterBounds :: addParameter returns const .

You might want to QMultiParameterBounds :: operator [] . Need to add a non-contact version of


Comments