pc wrote:
dsimcha Wrote:
== Quote from pc (peng2che...@yahoo.com)'s article
Is there a way to make the functions in std.string, such as replace, pure? Many
pure functions are going to want to use these.
[snip]
Here's the catch -- I could not make csvSplit pure. The inner functions were
referencing cvsSplits local variables. I think that the problem only occurs in
templates. The following isolates the issue:
Looks like a bug. I wrote the patch which allowed 'pure' to work with
nested functions, and it was one of my first patches (DMD 2.028). I
probably missed this case (I probably didn't test with templated
functions at all). Please put this test case into Bugzilla.