2 ms·
Seems like a good thing broadly. I haven't personally found a use for ranges, ever, but this seems consistent.
by loeg 1y ago
Seems like a good thing broadly. I haven't personally found a use for ranges, ever, but this seems consistent.
- mpyne 1y agoI've been using ranges fairly often but it's only for stuff like this: auto it = std::ranges::find(ctx.users, req_user_id, &User::user_id); If ctx.users is a vector<Users>, it will return an iterator pointing to the first matching User, by matching a field in User to a variable. It's just syntax sugar for std::find and a simple lambda but it's been really nice syntax sugar.