Template usage follows the same rules. As do these C++ casts. Thus, this should be "const_cast<float *>(ct.getTable())".