Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
此 range-v3 示例无法使用 Visual C++ 15.9 版进行编译:
auto letters = ranges::view::iota('a','g'); std::ostringstream out; out << letters;
这是设计使然吗?输出范围的方法是什么ostringstream?
ostringstream
这个程序:
#include <iostream> #include <sstream> #include <range/v3/view/iota.hpp> int main() { auto letters = ranges::view::iota('a','g'); std::ostringstream out; out << letters; std::cout << out.str(); }
适用于我的 VS 2017 15.9.3 和由 vcpkg 安装的 range-v3。它输出[a,b,c,d,e,f].
[a,b,c,d,e,f]