On Monday, 14 September 2015 at 15:30:14 UTC, Ali Çehreli wrote:
On 09/14/2015 08:01 AM, Laeeth Isharc wrote:
> I was trying to use the same variable eg
>
>        auto chain1 = chain("foo", "bar");
>        chain1 = chain(chain1, "baz");
[...]
> It may be that the type of chain1
> and chain2 don't mix.

Exactly.

I was going to recommend using pragma(msg, typeof(chain1)) to see what they are but it looks like chain()'s return type is not templatized. (?)

    pragma(msg, typeof(chain1));
    pragma(msg, typeof(chain2));

Prints

Result
Result

instead of something like (hypothetical)

ChainResult!(string, string)
ChainResult!(ChainResult!(string, string), string)

Ali

It is templated, but by means of it's enclosing function being templated, which doesn't end up in the name.

Reply via email to