[challenge] Bounded types

Daniel Murphy yebblies at nospamgmail.com
Mon Oct 11 22:33:56 PDT 2010


"Denis Koroskin" <2korden at gmail.com> wrote in message 
news:op.vkfv2p13o7cclz at korden-pc...
> On Tue, 12 Oct 2010 05:30:27 +0400, Philippe Sigaud 
> <philippe.sigaud at gmail.com> wrote:
>
> That could be as simple as:
>
> struct Bounded(A min, A max, T = A) { ... }
>

Better yet,
struct Bounded(A min, B max, T = CommonType!(A, B)) { ... } 




More information about the Digitalmars-d mailing list