Skip to content

Comment on Soursop and Ponies in Kona: A C++ Committee Trip Report

Comments

I spent an ungodly amount of time over the past couple of years exploring ways to get views::enumerate (a view that yields an index + an element for each element of a range) to produce a struct with named members (index & value), as this is more ergonomic and safer than std::get<0>(*it). Alas, despite my best efforts and hundreds of hours invested, this proved almost unworkable.

Isn’t this a damming indictment of the language and everything that is wrong with it? How can something so simple be so hard?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.