C++ Logo

std-discussion

Advanced search

may std:partial_sum change elements of the specified range?

From: Vladimir Grigoriev <vlad.moscow_at_[hidden]>
Date: Wed, 23 Nov 2022 01:07:13 +0300
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

Received on 2022-11-22 22:07:36