Re: Deducing types for function templates

2011-03-21 Thread Magnus Lie Hetland
On 2011-03-15 21:13:36 +0100, Michel Fortin said: Oh, it's much older than that: http://d.puremagic.com/issues/show_bug.cgi?id=2128 I'm not sure it's the same thing, but I realize it's hard to say given Magnus in his original post didn't mention how he attempts to instantiate the template.

Deducing types for function templates

2011-03-15 Thread Magnus Lie Hetland
I've got a function template along these lines: Foo!T foo(T)(T[] bar, real function(T,T) baz) { ... } The main reason I'm using this is that it seems necessary to use a function, rather than a type (such as Foo), if you want the compiler to deduce the compile-time parameters. (Right?) Now

Re: Deducing types for function templates

2011-03-15 Thread Michel Fortin
On 2011-03-15 10:42:46 -0400, Magnus Lie Hetland mag...@hetland.org said: I've got a function template along these lines: Foo!T foo(T)(T[] bar, real function(T,T) baz) { ... } The main reason I'm using this is that it seems necessary to use a function, rather than a type (such as Foo), if

Re: Deducing types for function templates

2011-03-15 Thread Simen kjaeraas
On Tue, 15 Mar 2011 17:36:04 +0100, Michel Fortin michel.for...@michelf.com wrote: On 2011-03-15 10:42:46 -0400, Magnus Lie Hetland mag...@hetland.org said: I've got a function template along these lines: Foo!T foo(T)(T[] bar, real function(T,T) baz) { ... } The main reason I'm using

Re: Deducing types for function templates

2011-03-15 Thread Michel Fortin
On 2011-03-15 13:20:30 -0400, Simen kjaeraas simen.kja...@gmail.com said: On Tue, 15 Mar 2011 17:36:04 +0100, Michel Fortin michel.for...@michelf.com wrote: On 2011-03-15 10:42:46 -0400, Magnus Lie Hetland mag...@hetland.org said: I've got a function template along these lines: Foo!T