我正在寻找使用 C++ 范围。工作草案,范围的 C++ 扩展说:
The Ranges library provides the Ranges library headers, shown in Table 2.
Table 2 — Ranges TS library headers
<experimental/ranges/algorithm> <experimental/ranges/random>
<experimental/ranges/concepts> <experimental/ranges/tuple>
<experimental/ranges/functional> <experimental/ranges/utility>
<experimental/ranges/iterator>
我发现最接近的是Range-v3 - 标准库的范围算法、视图和操作,它说:
Range library for C++11/14/17. This code is the basis of a formal proposal to add range support to the C++ standard library.
This library is header-only. You can get the source code from the range-v3 repository on github. To compile with Range-v3, you can either #include the entire library:
#include <range/v3/all.hpp>
Or you can #include only the core, and then the individual headers you want:
#include <range/v3/core.hpp>
#include <range/v3/....
解释带有“实验性”的 Ranges TS 和没有它的 Range V3 之间的差异。在哪里可以找到带有“实验/范围”的范围?有什么意义,重要吗?这应该是控制它的编译器选项吗?