I can use any version of C++ (up to 20).
Having a function implemented in assembly language as GCC's extended asm
static inline void foo(){
__asm__ __volatile__("Some asm code" ::: "some clobbers");
}
how to write a template which would generate a code repeating the foo
's n
times?
Something like this:
template<int n>
static void bar(){
//repeat inlined foo's code n times
}