detecting classes, structs, arrays in templates

2011-01-23 Thread Luke J. West
Hi, I want to specialize a template function - call it print() - for three cases: classes, structs and arrays. Ideally I'd like something that looks 'functional' like a proper specialization, but perhaps I need to use static if. I'm still at the beginning of my journey with D so I'd be grateful

Re: detecting classes, structs, arrays in templates

2011-01-23 Thread Simen kjaeraas
Luke J. West l...@west.me.uk wrote: Hi, I want to specialize a template function - call it print() - for three cases: classes, structs and arrays. Ideally I'd like something that looks 'functional' like a proper specialization, but perhaps I need to use static if. I'm still at the beginning of

Re: detecting classes, structs, arrays in templates

2011-01-23 Thread bearophile
Luke J. West: Hi, I want to specialize a template function - call it print() - for three cases: classes, structs and arrays. Ideally I'd like something that looks 'functional' like a proper specialization, but perhaps I need to use static if. I'm still at the beginning of my journey with D

Re: detecting classes, structs, arrays in templates

2011-01-23 Thread Luke J. West
Thanks for that bearophile - I'll get myself subscribed right away. Bye for now, Luke On Sun, 23 Jan 2011 09:17:05 -0500, bearophile bearophileh...@lycos.com said: Luke J. West: Hi, I want to specialize a template function - call it print() - for three cases: classes, structs and