Pitfalls of delegates inside ranges
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Mon Sep 2 09:32:24 PDT 2013
On 02/09/13 17:44, Artur Skawina wrote:
> The nasty part of that is that the type of .funcptr, hence also of the
> '_jump' pointer, is bogus. So calling via '_jump' directly can succeed,
> but do the wrong thing. It's a language issue; one reasonable workaround
> would be to define a MemberPtr type, which disallows direct calls.
SafeDelegate, perhaps? Might be a worthwhile library addition.
More information about the Digitalmars-d-learn
mailing list