Consider the following code snippet
 
int a[] = { 1, 2, 3, 4, 5 };
 
std::partial_sum( std::begin( a ), std::end( a ), std::begin( a ) );
 
Is it a well-formed code?
 
With best regards
(Vlad from Moscow)
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com