Appending a C-array to a vector in reverse order in C++98/03 without a for-loop

Viewed 2323

Its pretty straightforward to append a C-array to a vector (in C++ 98/03) like so:

std::vector<int> vec;
const int array[5] = { 1 , 2 , 3 , 4 , 5};

vec.insert( vec.end() , array , array + 5 );

Is there a way to append the array to a vector in reverse order in C++98/03 without writing a for-loop. (Here's looking at you Sean Parent.)

2 Answers
Related