Namespaces
Variants
Views
Actions

Talk:cpp/memory/ranges/uninitialized copy

From cppreference.com

Hi, in the Possible Implementation section, shouldn't the code in the catch clause destroy the already constructed objects in reverse order of construction? Don't know if that is specified in the standard but if not, it should. Nori0815 (talk) 03:38, 6 January 2023 (PST)

Standard says they're destroyed in unspecified order (also mentioned on the page). No reason to destroy them in reverse order --Ybab321 (talk) 04:09, 6 January 2023 (PST)
It also would be inefficient in general to destroy them in reverse order, since the output sequence is given by forward iterator/sentinel pair. --Space Mission (talk) 07:05, 6 January 2023 (PST)