To add const to a non-const object, which is the prefered method? const_cast or static_cast. In a recent question, s
const
const_cast
static_cast
You could write your own cast:
template const T & MakeConst(const T & inValue) { return inValue; }