现代C++ 教程:高速上手C++11/14/17/20及其相关 对字符串内容进行匹配的最常见手段就是使用正则表达式。可惜在传统 C++ 中正则表达式一直没 有得到语言层面的支持,没有纳入标准库,而 C++ 作为一门高性能语言,在后台服务的开发中,对 URL 资源链接进行判断时,使用正则表达式也是工业界最为成熟的普遍做法。 一般的解决方案就是使用 boost 的正则表达式库。而 C++11 正式将正则表达式的的处理方法纳入 标准库的行列,从语言级上提供了标准的支持,不再依赖第三方。 总结 本节简单介绍了正则表达式本身,然后根据使用正则表达式的主要需求,通过一个实际的例子介绍 了正则表达式库的使用。 习题 1. 在 Web 服务器开发中,我们通常希望服务某些满足某个条件的路由。正则表达式便是完成这一目 标的工具之一。 给定如下请求结构: 60 习题 第 6 章正则表达式 struct Request { // request method, POST, GET; parse_request(std::istream& stream) const { // TODO } } 请实现成员函数 start() 与 parse_request。使得服务器模板使用者可以如下指定路由: templatevoid start_server(SERVER_TYPE &server) { // process GET request 0 码力 | 83 页 | 2.42 MB | 1 年前3
《深入浅出MFC》2/e勉强有点概念,但是到了第三章,感觉好象世界末日了。MFC 六大技术的仿真...好象很 难懂,读起来非常吃力 是不是有其它书讲得比较简单的?我不是计算机科系学生,只是 对计算机程序设计有兴趣,一路由basic -> FORTRAN -> C -> C++ 走来... szu.bbs@bbs.es.ncku.edu.tw:是的,第三章也许是世界末日,当初我看的时候也是跳过不 看,不然就是看完frame10 码力 | 1009 页 | 11.08 MB | 1 年前3
From Eager Futures/Promises to Lazy Continuations: Evolving an Actor Library Based on Lessons Learned from Large-Scale Deploymentsnamespace http { templatevoid Post(std::string url, std::string body, K k) { void* data = new K(std::move(k)); ... http_post(url, body, data, +[](long code, const char* body, void* data) namespace http { template void Post(std::string url, std::string body, K k) { void* data = new K(std::move(k)); ... http_post(url, body, data, +[]( long code, const char* body, void* data) namespace http { template void Post(std::string url, std::string body, K k) { void* data = new K(std::move(k)); ... http_post(url, body, data, +[](long code, const char* body, void* data) 0 码力 | 264 页 | 588.96 KB | 6 月前3
Conan 1.9 Documentationof the 1.9.0 version: $ conan inspect Poco/1.9.0@pocoproject/stable ... name: Poco version: 1.9.0 url: http://github.com/pocoproject/conan-poco license: The Boost Software License 1.0 author: None description: 606fdb601e335c2001bdf31d478826b644747077 BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/conan-community/conan-openssl License: The current OpenSSL licence is an 'Apache 09378ed7f51185386e9f04b212b79fe2d12d005c BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/pocoproject/conan-poco License: The Boost Software License 1.0 Recipe: Cache Binary:0 码力 | 470 页 | 3.05 MB | 1 年前3
Conan 1.11 Documentationof the 1.9.0 version: $ conan inspect Poco/1.9.0@pocoproject/stable ... name: Poco version: 1.9.0 url: http://github.com/pocoproject/conan-poco license: The Boost Software License 1.0 author: None description: 606fdb601e335c2001bdf31d478826b644747077 BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/conan-community/conan-openssl License: The current OpenSSL licence is an 'Apache 09378ed7f51185386e9f04b212b79fe2d12d005c BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/pocoproject/conan-poco License: The Boost Software License 1.0 Recipe: Cache Binary:0 码力 | 490 页 | 4.05 MB | 1 年前3
Conan 1.20 Documentationof the 1.9.0 version: $ conan inspect Poco/1.9.0@pocoproject/stable ... name: Poco version: 1.9.0 url: http://github.com/pocoproject/conan-poco license: The Boost Software License 1.0 author: None description: 606fdb601e335c2001bdf31d478826b644747077 BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/conan-community/conan-openssl License: The current OpenSSL licence is an 'Apache 09378ed7f51185386e9f04b212b79fe2d12d005c BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/pocoproject/conan-poco License: The Boost Software License 1.0 Recipe: Cache Binary:0 码力 | 611 页 | 4.89 MB | 1 年前3
Conan 1.19 Documentationof the 1.9.0 version: $ conan inspect Poco/1.9.0@pocoproject/stable ... name: Poco version: 1.9.0 url: http://github.com/pocoproject/conan-poco license: The Boost Software License 1.0 author: None description: 606fdb601e335c2001bdf31d478826b644747077 BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/conan-community/conan-openssl License: The current OpenSSL licence is an 'Apache 09378ed7f51185386e9f04b212b79fe2d12d005c BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/pocoproject/conan-poco License: The Boost Software License 1.0 Recipe: Cache Binary:0 码力 | 609 页 | 4.88 MB | 1 年前3
Conan 1.15 Documentationof the 1.9.0 version: $ conan inspect Poco/1.9.0@pocoproject/stable ... name: Poco version: 1.9.0 url: http://github.com/pocoproject/conan-poco license: The Boost Software License 1.0 author: None description: 606fdb601e335c2001bdf31d478826b644747077 BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/conan-community/conan-openssl License: The current OpenSSL licence is an 'Apache 09378ed7f51185386e9f04b212b79fe2d12d005c BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/pocoproject/conan-poco License: The Boost Software License 1.0 Recipe: Cache Binary:0 码力 | 540 页 | 4.22 MB | 1 年前3
Conan 1.16 Documentationof the 1.9.0 version: $ conan inspect Poco/1.9.0@pocoproject/stable ... name: Poco version: 1.9.0 url: http://github.com/pocoproject/conan-poco license: The Boost Software License 1.0 author: None description: 606fdb601e335c2001bdf31d478826b644747077 BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/conan-community/conan-openssl License: The current OpenSSL licence is an 'Apache 09378ed7f51185386e9f04b212b79fe2d12d005c BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/pocoproject/conan-poco License: The Boost Software License 1.0 Recipe: Cache Binary:0 码力 | 545 页 | 4.34 MB | 1 年前3
Conan 1.14 Documentationof the 1.9.0 version: $ conan inspect Poco/1.9.0@pocoproject/stable ... name: Poco version: 1.9.0 url: http://github.com/pocoproject/conan-poco license: The Boost Software License 1.0 author: None description: 606fdb601e335c2001bdf31d478826b644747077 BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/conan-community/conan-openssl License: The current OpenSSL licence is an 'Apache 09378ed7f51185386e9f04b212b79fe2d12d005c BuildID: None Remote: conan-center=https://conan.bintray.com URL: http://github.com/pocoproject/conan-poco License: The Boost Software License 1.0 Recipe: Cache Binary:0 码力 | 528 页 | 4.17 MB | 1 年前3
共 85 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













