http://d.puremagic.com/issues/show_bug.cgi?id=8520
--- Comment #2 from Alex R�nne Petersen <a...@lycus.org> 2012-08-08 12:15:19 CEST --- (In reply to comment #1) > Your understanding is wrong - templates never go in the vtable. > > The solution is to use NVI and forwarding: > > interface I > { > int* opBinaryRight_in(int i); > > int* opBinaryRight(string op : "in")(int i) > { > return opBinaryRight_in(i); > } > } > > class C : I > { > int* opBinaryRight_in(int i) > { > return null; > } > } I could understand if the opBinaryRight template wasn't constrained to "in", but it is, so I see no reason why it cannot be in the vtable since it can only ever have one instance in a class. The NVI solution works, but it's very ugly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------