2019 Vitess at GoSV
0 码力 | 20 页 | 1.07 MB | 1 年前3Unraveling string_view: Basics, Benefits, and Best Practices
foo(std::string_view sv); We can just write: std::string s("hello"); const char* p_str = s.c_str(); const size_t p_str_size = s.size(); foo(s); foo({p_str, p_str_size}); foo(p_str); void foo(std::string_view sv) { cout << sv << '\n'; } hello hello hello Apart from this convenience, string_view also provides performance benefits which we will see shortly.Basics • string_view does not allocate any memory. • • It consists of a) pointer to string and b) length. 5 H E L L O ! \0 sv1 { pointer, len = 6 } sv2 { pointer, len = 2 } Unlike std::string, std::string_view is NOT null terminated*. *There are non-standard0 码力 | 61 页 | 1.11 MB | 5 月前3Lifetime Safety in C++: Past, Present and Future
int &r3 = std::vector().at(3); // warn } void h() { std::basic_string_view sv; takeStringView(sv = std::basic_string ()); // warn }C26815 & C26816, -Wdangling-gsl int &f() { std::stack int &r3 = std::vector ().at(3); // warn } void h() { std::basic_string_view sv; takeStringView(sv = std::basic_string ()); // warn }Lifetimebound annotation (P0936) struct X { int string_view sv; if (b) sv = "Hello CppCon!"; ... if (cond()) return sv[0]; ... }Flow-sensitive lifetime analysis char hello(bool b) { string_view sv; if (b) sv = "Hello CppCon 0 码力 | 124 页 | 2.03 MB | 5 月前3httpd 2.4.25 中文文档
C Resources accept trailing pathname information AccessFileName filename [filename] ... .htaccess sv C Name of the distributed configuration file Action action-type cgi-script [virtual] svdh B Activates Maps the given filename extension to the specified content language AddModuleInfo module-name string sv E Adds additional information to the module information displayed by the server-info handler AddOutputFilter file-path|directory-path svd B Maps URLs to filesystem locations AliasMatch regex file-path|directory-path sv B Maps URLs to filesystem locations using regular expressions Allow from all|host|env=[!]env-variable0 码力 | 2573 页 | 2.12 MB | 1 年前3httpd 2.4.23 中文文档
C Resources accept trailing pathname information AccessFileName filename [filename] ... .htaccess sv C Name of the distributed configuration file Action action-type cgi-script [virtual] svdh B Activates Maps the given filename extension to the specified content language AddModuleInfo module-name string sv E Adds additional information to the module information displayed by the server-info handler AddOutputFilter file-path|directory-path svd B Maps URLs to filesystem locations AliasMatch regex file-path|directory-path sv B Maps URLs to filesystem locations using regular expressions Allow from all|host|env=[!]env-variable0 码力 | 2559 页 | 2.11 MB | 1 年前3httpd 2.4.20 中文文档
C Resources accept trailing pathname information AccessFileName filename [filename] ... .htaccess sv C Name of the distributed configuration file Action action-type cgi-script [virtual] svdh B Activates Maps the given filename extension to the specified content language AddModuleInfo module-name string sv E Adds additional information to the module information displayed by the server-info handler AddOutputFilter file-path|directory-path svd B Maps URLs to filesystem locations AliasMatch regex file-path|directory-path sv B Maps URLs to filesystem locations using regular expressions Allow from all|host|env=[!]env-variable0 码力 | 2533 页 | 2.09 MB | 1 年前3httpd 2.4.18 中文文档
C Resources accept trailing pathname information AccessFileName filename [filename] ... .htaccess sv C Name of the distributed configuration file Action action-type cgi-script [virtual] svdh B Activates Maps the given filename extension to the specified content language AddModuleInfo module-name string sv E Adds additional information to the module information displayed by the server-info handler AddOutputFilter specified content type Alias URL-path file-path|directory-path sv B Maps URLs to filesystem locations AliasMatch regex file-path|directory-path sv B Maps URLs to filesystem locations using regular expressions0 码力 | 2467 页 | 1.89 MB | 1 年前3httpd 2.4.33 中文文档
C Resources accept trailing pathname information AccessFileName filename [filename] ... .htaccess sv C Name of the distributed configuration file Action action-type cgi-script [virtual] svdh B Activates Maps the given filename extension to the specified content language AddModuleInfo module-name string sv E Adds additional information to the module information displayed by the server-info handler AddOutputFilter file-path|directory-path svd B Maps URLs to filesystem locations AliasMatch regex file-path|directory-path sv B Maps URLs to filesystem locations using regular expressions Allow from all|host|env=[!]env-variable0 码力 | 2692 页 | 3.12 MB | 1 年前3httpd 2.4.17 中文文档
C Resources accept trailing pathname information AccessFileName filename [filename] ... .htaccess sv C Name of the distributed configuration file Action action-type cgi-script [virtual] svdh B Activates Maps the given filename extension to the specified content language AddModuleInfo module-name string sv E Adds additional information to the module information displayed by the server-info handler AddOutputFilter specified content type Alias URL-path file-path|directory-path sv B Maps URLs to filesystem locations AliasMatch regex file-path|directory-path sv B Maps URLs to filesystem locations using regular expressions0 码力 | 2455 页 | 1.88 MB | 1 年前3httpd 2.2.31 中文文档
C Resources accept trailing pathname information AccessFileName filename [filename] ... .htaccess sv C Name of the distributed configuration file Action action-type cgi-script [virtual] svdh B Activates Maps the given filename extension to the specified content language AddModuleInfo module-name string sv E Adds additional information to the module information displayed by the server-info handler AddOutputFilter specified content type Alias URL-path file-path|directory-path sv B Maps URLs to filesystem locations AliasMatch regex file-path|directory-path sv B Maps URLs to filesystem locations using regular expressions0 码力 | 1860 页 | 1.48 MB | 1 年前3
共 694 条
- 1
- 2
- 3
- 4
- 5
- 6
- 70