C++1z 的范围状态?

2022-01-24 00:00:00 standards range c++ c++11 c++17

C++ 委员会中有一个范围研究小组:

There is a study group on ranges in the C++ committee:

但我没有关注这个研究组的历史,我不确定 C++1z 的预期交付类型(此外我不使用 boost.range,因此我对现有的实践).我们会有:

but I have not followed the history of this study group and I am not sure of what kind of delivery is expected for C++1z (furthermore I do not use boost.range so I do not have a clear view of existing practices). Will we have:

  1. 将范围作为一对第一个/最后一个迭代器?

  1. ranges as a pair of first/last iterators?

范围上的联合和其他集合操作(??例如 [v.begin()+5, v.begin()+7[ U [v.begin()+10, v.begin()+15[ U[v.begin()+21,v.begin()+42[),即:并集、交集、不相交并集、补集?

union and other set operations on ranges(for example [v.begin()+5, v.begin()+7[ U [v.begin()+10, v.begin()+15[ U [v.begin()+21, v.begin()+42[), namely: union, intersection, disjoint union, complement?

迭代器过滤器(为了在满足条件的地方执行 for_each)?

iterator filters (in order to execute a for_each where a condition is satisfied)?

其他事情?

推荐答案

Eric Niebler 开始讨论他的 Iterable 工作(由四部分组成的博客文章:第 1 部分,第 2 部分,第 3 部分,第 4 部分) 在 SG9 邮件列表 2 月 27 日.从那以后有很多来回,特别是考虑到该列表已经死了大约一年.

Eric Niebler initiated discussion of his Iterable work (four-part blog posting: Part 1, Part 2, Part 3, Part 4) on the SG9 mailing list on Feb 27. There's been quite a bit of back and forth since then, especially considering that the list had been dead for about a year.

据我所知,作为局外人,SG 正在争论他们想要做什么".与制定标准/技术规范的措辞"相去甚远的阶段.阶段.然而,这是从休眠"状态向前迈出的一大步.阶段.最近几次委员会会议的会议记录很有启发性:

As near as I can tell as an outsider, the SG is in the "arguing about what they're trying to do" phase which is quite far from the "developing wording for a Standard/Technical Specification" phase. This is, however, a substantial move forward from the "dormant" phase. The meeting minutes from the last few committee meetings are illuminating:

  • 2013-05-03(布里斯托):

Marshall Clow [研究小组主席] 报告小组目前患有视力过度问题.没有论文.SG9 试图限制范围.预计不会进入 C++14

Marshall Clow [the study group chair] reports group is currently suffering from an excess of vision. There are no papers. SG9 is trying to constrain scope. Nothing expected to go into C++14

  • 2013-10-16(芝加哥):

    Clow 报告过去几个月没有任何活动.一篇论文来讨论 [我相信 N3752 "基于索引的范围"].将有晚上的会议.

    Clow reports no activity in past few months. One paper to discuss [I believe N3752 "Index Based Ranges"]. Will have evening session.

  • 2014-03-03(伊萨夸):

    Clow 没有报告任何文件,也没有会议.[Stephan] Lavavej 在 EWG 中报告了人们可能关心的范围的论文 [我相信指的是 N3853 基于范围的 For 循环:下一代"].道斯问工作是否停滞不前.Clow 说他的工作停滞不前,他还没有看到其他人正在做的工作.[Jeffrey] Yasskin 说他不确定论文的去向,这可能会阻碍 SG9 对论文的考虑.

    Clow reports no papers and no meeting. [Stephan] Lavavej reports a ranged for paper in EWG that the range people may care about [I believe referring to N3853 "Range-Based For-Loops: The Next Generation"]. Dawes asks if work is stalled. Clow says his work is stalled and he has not seen work others are doing. [Jeffrey] Yasskin says that he is unsure of where the papers are going which may be stalling SG9 consideration of papers.

  • 它并没有像大炮一样发展,AFAIK 也没有设定可交付的目标.

    It hasn't exactly been going like gangbusters, and there is no set deliverable goal AFAIK.

    相关文章