Thanks Robert<div><br></div><div>Meanwhile, I also found that my code works it I change parameter type to int instead of size_t. Looks like DMD fails because of some issue with implicit conversions (or lack of it) between integral types.</div>
<div><br></div><div>Anyway the solution you provided is more elegant and I will adopt that.</div><div><br></div><div>Regards</div><div>- Puneet</div>