#Translating Iterator-Based Sequence Manipulations to Modern cpp with ranges and views

8 messages · Page 1 of 1 (latest)

junior sequoia
#

I've been using an input iterator to process different segments of a sequence in my C++ code, like this:
I'm curious if I can handle these types of operations—like filtering, taking specific elements, and reducing them—using the newer std::ranges and std::views features in c++. Is there a way to use these tools to manage ranges in a more declarative and possibly simpler way?

cloud forgeBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

#

@junior sequoia

Screenshots!

Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!

heavy sleet
#

you should post the code though, not screen shots, like the bot says

#

the issue is you are doing some very wild operations there

#

and ranges are more designed for... hmm, more regular operations across a whole dataset

#

you seem to be doing hetrogenous operations on the dataset