Problem with C++ ranges also exhibited by D

Ali Çehreli acehreli at yahoo.com
Tue Apr 16 17:14:17 UTC 2019


On 04/16/2019 05:07 AM, Atila Neves wrote:
 > "Is it really necessary
 > to have separate operations for advancing the iterator and evaluating
 > its element?".

I've been under the impression that such separation is for strong 
exception guarantee. We can't popFront (and C++ cannot operator++) 
before knowing that the copy of the returned value has not thrown an 
exception.

The article you've linked does not even mention exceptions so perhaps 
this concern is now historical? Or perhaps there are no types that throw 
during copy anymore, meaning that they are either trivial bits or 
reference types?

Ali



More information about the Digitalmars-d mailing list