Hi;
I have tuples created by std.algorithm.group function.
auto tupleB = stringB.group();
I need to write a a function which takes tubleB and do some cool
stuff. If I don't use a function and write all code below
.group() everytihng works but for reusing the code I want to call
a
On 06/12/2015 03:19 PM, kerdemdemir wrote:
Hi;
I have tuples created by std.algorithm.group function.
auto tupleB = stringB.group();
I need to write a a function which takes tubleB and do some cool stuff.
If I don't use a function and write all code below .group() everytihng
works
void foo(R)(R range)
if (isInstanceOf!(Tuple, ElementType!R))// -- optional
{
Ali thanks a lot. I don't believe I didn't simply try your way.
It works.
I am also happy to learn optional static if . Your examples are
really useful for me.
Next time I will share whole code.
Thanks
On 06/12/2015 03:46 PM, kerdemdemir wrote:
void foo(R)(R range)
if (isInstanceOf!(Tuple, ElementType!R))// -- optional
{
I am also happy to learn optional static if .
Actually, it is not 'static if' but a template constraint. It is
optional because everything will work without it.