Re: Check Instance of Template for Parameter Type/Value

2015-10-20 Thread stew via Digitalmars-d-learn
On Monday, 19 October 2015 at 14:51:29 UTC, Stewart Moth wrote: I'm working with a library that has template structs of mathematical vectors that can sometimes be the type of an array I'm passing to a function. The definition of the struct is like this: struct Vector(type, int dimension_){

Re: Check Instance of Template for Parameter Type/Value

2015-10-19 Thread anonymous via Digitalmars-d-learn
On Monday, October 19, 2015 04:51 PM, Stewart Moth wrote: > struct Vector(type, int dimension_){ ... } > > Where type is going to be an int/float/etc and dimension_ is > 2/3/4. > > I could write a bunch of functions for each case, but I'd rather > not... I'd like to use something like the

Re: Check Instance of Template for Parameter Type/Value

2015-10-19 Thread Justin Whear via Digitalmars-d-learn
On Mon, 19 Oct 2015 14:51:28 +, Stewart Moth wrote: > I'm working with a library that has template structs of mathematical > vectors that can sometimes be the type of an array I'm passing to a > function. > > The definition of the struct is like this: > > struct Vector(type, int