[SERVER-28946] "Function sink" output iterator Created: 24/Apr/17  Updated: 06/Dec/22  Resolved: 20/Jun/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Justin Seyster Assignee: DO NOT USE - Backlog - Dev Tools
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Developer Tools
Participants:

 Description   

It would be nice to have an Output Iterator that lets you do something like this:

std::copy_if( begin( data ), end( data ), make_MagicIterator( []( auto &&d ) { /* your code here */ } ), []( auto &&x ) { return x > 42; } );

In other words – the output iterator pumps its value into whatever function you'd like.


Generated at Thu Feb 08 04:19:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.