Is there a more elegant way to do this?
bauss via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Mar 11 21:16:36 PST 2017
On Sunday, 12 March 2017 at 05:13:41 UTC, bauss wrote:
> I was wondering if there's a more elegant way to do something
> like this?
>
> [...]
I saw one improvement to it which would be BitSize!ChildType
instead of taking parent type's bit size divided by two.
Also
value = ((highValue << 16 | low));
Is supposed to be
value = ((highValue << BitSize!ChildType | low));
More information about the Digitalmars-d-learn
mailing list