Thanks Nicholas , I have integrated some of your advice on the edited code i.e. foreach and ref in pattern . Hope I fully understood what you meant. Am yet to look whether I still need to change the signature . I have heared there are two approaches to this, Where does one really draw the line between CTFE and Template metaprogramming?

Template metaprogramming == "abuse the template facility in C++ to run a program in compile time" used to be the only way to execute something at compile time in C++. In D you don't want to do that as writing such code is a matter of putting an enum or static at the right place. Still, you can use templates to achieve your goal, if that helps.

Reply via email to