"Petec" <> wrote in message news:<CWusc.8842$ ink.net>...
> Petec wrote:
> > JKop wrote:
> <snip>
> >
> > operator T()
> > {
> > return var;
> > }
>
> Should be:
>
> operator T&()
> {
> return var;
> }
>
> To allow operators to be applied.
No. If the restriction is that the value should be positive,
one cannot allow T:

perator*=, someonce could pass -1. The same
applies for operator+=, opertaor/=, and (for positive arguments)
to operator-=.
The correct form is operator T() const;, as it won't modify var.
Regards,
Michiel Salters