Generic Span/Limits/MinMax Type

2014-01-20 Thread Nordlöw
Has anyone cooked up a generic D struct that groups together min and max values of a type and default-initializes them in the correct way? Something like struct Limits(T) { /* TODO: Fix purity of this by fixing Bytes.value() */ auto init() @trusted /* pure */ nothrow

Re: Generic Span/Limits/MinMax Type

2014-01-20 Thread sclytrack
On Monday, 20 January 2014 at 19:36:13 UTC, Nordlöw wrote: Has anyone cooked up a generic D struct that groups together min and max values of a type and default-initializes them in the correct way? Something like struct Limits(T) { /* TODO: Fix purity of this by fixing Bytes.