peter koch
11/8/2008 11:53:00 PM
On 7 Nov., 15:01, puru <purushotta...@gmail.com> wrote:
> I have a template class like below.
> template <TInt S> class XYZ
> {
>
> }
>
> const XYZ<10> abc; //Instance of the class
>
> How do remove the constantness of abc using const_cast. I mean, I want
> the syntax for that. Something like const_cast<XYZ<10>> abc gives
> compiler error.
Others have explained how, but I believe having to cast is a design
error. Instead of casting yourself out of your errors, you should
correct the design, which in the long run is going to save you time
and trouble.
/Peter