I'm trying to create 2 extra method for arrays (range would be better,
though I don't quite understand what is a range)
Although I have some indecipherable (to me) compiler error...
What's wrong with the code below?
==
import std.algorithm;
public:
void remove(T)(ref T[]
On 13.06.2011 16:03, Lloyd Dupont wrote:
I'm trying to create 2 extra method for arrays (range would be
better, though I don't quite understand what is a range)
Although I have some indecipherable (to me) compiler error...
What's wrong with the code below?
==
import
removed some obvious error, still stumped on the templated syntax ...
so.. why is it not compiling?
(error:
Error: template std.algorithm.countUntil(alias pred = a == b,R1,R2) if
(is(typeof(startsWith!(pred)(haystack,needle does not match any function
template declaration
)
=
import
ho.. plenty of silly mistake indeed.. thanks for spotting them!
(maybe I should take a break and play the witcher 2 hey!?!? :)
however I still have a problem with removeAt now! :(
===
void removeAt(T)(ref T[] array, int index)
{
if(index 0 || index = array.length)
return;
On 13.06.2011 16:49, Lloyd Dupont wrote:
ho.. plenty of silly mistake indeed.. thanks for spotting them!
(maybe I should take a break and play the witcher 2 hey!?!? :)
Why not ? ;-)
however I still have a problem with removeAt now! :(
===
void removeAt(T)(ref T[] array, int index)
{
I'm trying to create 2 extra method for arrays (range would be
better, though I don't quite understand what is a range)
Although I have some indecipherable (to me) compiler error...
What's wrong with the code below?
==
import std.algorithm;
public:
void remove(T)(ref T[]