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));