template arguments inside a compile time unrolled for loop?
问题 wikipedia (here) gives a compile time unrolling of for loop....... i was wondering can we use a similar for loop with template statements inside... for example... is the following loop valid template<int max_subdomain> void Device<max_sudomain>::createSubDomains() { for(int i=0; i< max_subdomain; ++i) { SubDomain<i> tmp(member); ... // some operations on tmp ... } } SubDomain is a class which takes in the a template parameter int and here has been constructed with an argument that is a member