Added reverse adaptor: https://reviews.apache.org/r/42450 https://reviews.apache.org/r/42451 Ben, do you think it makes sense to add the above? - Jie On Sat, Jan 16, 2016 at 12:33 PM, Jie Yu wrote: > Maybe include boost::adaptor into stout under namespace adaptor? I liked > the adaptor idea since it can be composed. > > - Jie > > On Sat, Jan 16, 2016 at 10:48 AM, Benjamin Mahler > wrote: > >> It seems unfortunate to introduce alternative looping constructs, for >> example the following would be the more composable approach: >> >> foreach (int i, reversed(numbers)) { >> >> } >> >> I remember this coming up before: >> >> http://mail-archives.apache.org/mod_mbox/mesos-dev/201410.mbox/%3C20141002211204.18846.48448@reviews.apache.org%3E >> >> Thoughts? >> >> On Saturday, January 16, 2016, Jie Yu wrote: >> >>> >>> ----------------------------------------------------------- >>> This is an automatically generated e-mail. To reply, visit: >>> https://reviews.apache.org/r/42379/#review114871 >>> ----------------------------------------------------------- >>> >>> Ship it! >>> >>> >>> >>> 3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp (lines 55 - >>> 58) >>> >>> >>> Ca you move this below 'foreachvalue'? >>> >>> >>> - Jie Yu >>> >>> >>> On Jan. 16, 2016, 1:32 a.m., Timothy Chen wrote: >>> > >>> > ----------------------------------------------------------- >>> > This is an automatically generated e-mail. To reply, visit: >>> > https://reviews.apache.org/r/42379/ >>> > ----------------------------------------------------------- >>> > >>> > (Updated Jan. 16, 2016, 1:32 a.m.) >>> > >>> > >>> > Review request for mesos and Jie Yu. >>> > >>> > >>> > Repository: mesos >>> > >>> > >>> > Description >>> > ------- >>> > >>> > Add reverse_foreach in libprocess. >>> > >>> > >>> > Diffs >>> > ----- >>> > >>> > 3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp >>> 7fb0044790ee249b69e07b81a26851bd5bfb110f >>> > >>> > Diff: https://reviews.apache.org/r/42379/diff/ >>> > >>> > >>> > Testing >>> > ------- >>> > >>> > make check >>> > >>> > >>> > Thanks, >>> > >>> > Timothy Chen >>> > >>> > >>> >>> >