Manipulating Bits of Any Value Type

Stanislav Blinov stanislav.blinov at gmail.com
Sun Jan 26 15:54:01 PST 2014


On Sunday, 26 January 2014 at 23:37:40 UTC, Nordlöw wrote:

>> Might I ask... why do you need this sort of thing? :)
>
> For bit-parallel run-length encoding for efficient 
> serialization of sets of std.datetime:SysTime structures (16 
> bytes).

SysTime's representation consists of a long and 
Rebindable!(immutable(TimeZone)). The latter is a struct 
containing a reference.

>> The closest would be std.traits.hasIndirections.
>
> Does this work recursively on containing types?

AFAIK no, it just checks immediate fields (if any).


More information about the Digitalmars-d-learn mailing list