Is the order for variadic template pack expansion defined in the standard?
问题 I thought that expanding a parameter pack had the following behavior: // for Args ... p f(p)...; // was equivalent to f(p1); f(p2); ...; f(pn); But I just found out that gcc (4.6, 4.7 and 4.8) does it the other way around: f(pn); ...; f(p2); f(p1); Whereas clang does it as I expected. Is that a bug in GCC or are they both valid according to the standard? Minimal example #include <iostream> #include <string> template<typename T> bool print(const unsigned index, const T& value){ std::cerr <<