A stripped down problem to avoid fluff. The C macro:
#define FLOB(t) (sizeof(t))
Can be used in another macro:
#define THINGY(a, b) (_THING(a, FLOB(b)))
We can use this as in:
THINGY(10, __u32)
Now the D Way says use functions not macros. except that
size_t FLOB(T)(auto ref T t) { return t.sizeof; }
which is the result of DStep doesn't allow passing a type name as t.
Is this a problem in D or a problem in DStep?
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected]
41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected]
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part
