I have something like the following code:
template
void inc(T1& t1, T2& t2, T3& t3, T
What guarantees does the new proposed standard provide wrt the issue of the recursive function calls, is there some indication that the above variadic version will be as optimal as the original? (should I add inline or some-such?)
The standard won't guarantee an optimization will be performed, it only specifies the behavior and the result. Whether the function will be inlined problem of the implementation.
In fact, the inline keyword is only a hint to the compiler which is often ignored because the compiler can decide better.
Finally, g++-4.5 completely inlined all inc
functions at -O2
. Don't know if it's what you want.