It seems that "inout" isn't enough to fix the problem.
So i extend the template to this: http://codepad.org/SwBPoVM2 I wrote a copy of the function and now there is one with and one without const. I thought inout would do the job alone but it seems that it doesn't. Now all of my code works as i expected. But because of my bad english i would prefer that one of you report the bug and the fix.
