How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

A shocking discovery about gcc’s unidirectional rotation algorithm -- Raymond Chen

calendar_today July 23, 2026 person Blog Staff domain cplusplus

Last time, we looked at the rotation algorithm used by gcc libstdc++ for random-access iterators , and I concluded by noting that we’re going to make a shocking discovery. Rotation revisited: A shocking discovery about gcc’s unidirectional rotation algorithm by Raymond Chen From the article: As with all shocking discoveries, this one will shock disappoint you. The discovery is that the gcc libstdc++ algorithm is the same as the forward-iterator algorithm !

open_in_new Read original post