根据图书馆进化孵化器的最新会议,获得大力支持的设施之一是std::web_view。
该提案在P1108R2 中描述,将用于
通过利用现有的网络标准和技术,实现现代、自然、多模式的用户交互。
std::web_view w("web_view test app");
w.set_uri_scheme_handler("wv", [&](const std::string &uri, std::ostream &os) {
std::cout << "request: " << uri << "\n";
os << "<html><head><title>" << uri << "</title></head><body><p>" << uri << "</p><table>";
for (auto &a : args)
os << "<tr><td>" << a << "</td></tr>" << "\n"; // we need some kind of "to_html" utility function.
os << "</table>";
os << "<p><a href=\"" << uri << "/more.html" << "\">more</a></p>";
os << "<ul id='dl'></ul>";
os << …Run Code Online (Sandbox Code Playgroud) 考虑以下使用默认值初始化数组的示例:
static unsigned int array[10] = { [ 0 ... 9 ] = 5 };
Run Code Online (Sandbox Code Playgroud)
这个运算符到底是做什么的?
它与可变参数宏有关__VA_ARGS__?