How to translate this C macro to D mixin/template mixin?

VitaliiY yvitaliy1980 at yandex.ru
Wed Jun 16 05:43:07 UTC 2021


On Tuesday, 15 June 2021 at 12:38:15 UTC, Ali Çehreli wrote:
> On 6/15/21 5:18 AM, VitaliiY wrote:
>
> > STOREBITS and ADDBITS use variables defined in STARTDATA
>
> If possible in your use case, I would put those variables in a 
> struct type and make add() a member function. However, a 
> similar type already exists as std.bitmanip.BitArray.
>
> Ali

Thank you, Ali! Idea with member function seems interesting.


More information about the Digitalmars-d-learn mailing list