templating operators
Derek Parnell
derek at psych.ward
Thu Mar 2 21:47:18 PST 2006
On Thu, 2 Mar 2006 21:38:09 -0800, Brad Roberts wrote:
> On Fri, 3 Mar 2006, Derek Parnell wrote:
>
> This works wonderfully for opIndexAssign, but not so much for multiple
> types of aliases for opIndex.
>
> alias opIndex_T!(int).opIndex opIndex;
> alias opIndex_T!(float).opIndex opIndex;
>
That would because one can't overload the return type. Your code is kinda
like doing ...
int opIndex(char[] x) ...
float opIndex(char[] x) ...
and that just ain't going to fly.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocracy!"
3/03/2006 4:45:56 PM
More information about the Digitalmars-d
mailing list