On 1/30/15 5:06 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net
wrote:
On Friday, 30 January 2015 at 08:52:41 UTC, bearophile wrote:
Jeremy DeHaan:
I figured that it would be smart enough to
deduce the parameter type based on the type that it was trying to be
assigned to.
For that you
On Friday, 30 January 2015 at 08:52:41 UTC, bearophile wrote:
Jeremy DeHaan:
I figured that it would be smart enough to
deduce the parameter type based on the type that it was trying
to be assigned to.
For that you need languages like Haskell/Rust. D type inference
doesn't work from the
Jeremy DeHaan:
I figured that it would be smart enough to
deduce the parameter type based on the type that it was trying
to be assigned to.
For that you need languages like Haskell/Rust. D type inference
doesn't work from the type something is assigned to.
Bye,
bearophile
On Friday, 30 January 2015 at 06:35:31 UTC, Jeremy DeHaan wrote:
I have a template fuction that looks like this:
immutable(T)[] getString(T)() const
if (is(T == dchar)||is(T == wchar)||is(T == char))
Basically, I was hoping that the type would be deduced based on
the prameter that was being
I have a template fuction that looks like this:
immutable(T)[] getString(T)() const
if (is(T == dchar)||is(T == wchar)||is(T == char))
Basically, I was hoping that the type would be deduced based on
the prameter that was being assigned to like so.
string ret = thing.getString();
Apparently
On Friday, 30 January 2015 at 07:13:09 UTC, Jeremy DeHaan wrote:
That seems strange. I figured that it would be smart enough to
deduce the parameter type based on the type that it was trying
to
be assigned to.
It seems sensible to me, as changing string to auto would leave
the type of the
On Friday, 30 January 2015 at 06:58:58 UTC, Vlad Levenfeld wrote:
On Friday, 30 January 2015 at 06:35:31 UTC, Jeremy DeHaan wrote:
A bunch of stuff
for template type deduction to work, you have to supply an
argument. Your type signature would need to look like this:
immutable(T)[]