Back to Basics: Templates Part 2
Basics: Templates – Part 2 Bob Steagall CppCon 2021CppCon 2021 – Back to Basics: Templates – Part 2 Copyright © 2021 Bob Steagall Recap: Templates • C++ supports generic programming with templates • A kinds of templates • Function templates • Class templates • Member function templates • Alias template • Variable templates • Lambda templates 2CppCon 2021 – Back to Basics: Templates – Part 2 Copyright inclusion preprocessing directives (#ifdef) • And all macros expanded 3CppCon 2021 – Back to Basics: Templates – Part 2 Copyright © 2021 Bob Steagall Recap: Declarations and Definitions • A name is an identifier0 码力 | 80 页 | 490.15 KB | 5 月前3Back to Basics: Templates - Part 1
Back to Basics: Templates – Part 1 Bob Steagall CppCon 2021CppCon 2021 – Back to Basics: Templates – Part 1 Copyright © 2021 Bob Steagall Overview • Rationale • Template fundamentals • Template categories categories in detail 2CppCon 2021 – Back to Basics: Templates – Part 1 Copyright © 2021 Bob Steagall Goals and References • Goals • Cover major features • Explain some important terminology and concepts concepts • Point to next steps • Recommended references • C++ Templates The Complete Guide, Second Edition David Vandevoorde, Nicolai M. Josuttis, Douglas Gregor – Addison-Wesley 2018 • Effective Modern0 码力 | 68 页 | 436.75 KB | 5 月前3Back to Basics: C++ Templates - Part 1
Info @Andreas__Fertig B2B: C++ Templates Part 1 fertig adjective /ˈfɛrtɪç/ finished ready complete completed Andreas Fertig v1.0 B2B: C++ Templates 2 B2B: C++ Templates Part 1 © 2020 Andreas Fertig flexi bility. Andreas Fertig v1.0 B2B: C++ Templates 3 Templates ■ Templates are a kind of pattern for the compiler. ■ We can instantiate templates with different types or values. ■ Each instantiation ment. ■ Templates reduce a lot of writers’ work. We do not have to implement functions multiple times just because it’s a slightly different type. ■ There are different types of templates: ■ Functiontemplates0 码力 | 17 页 | 817.47 KB | 5 月前3Back to Basics: C++ Templates - Part 2
Fertig https://AndreasFertig.Info post@AndreasFertig.Info @Andreas__Fertig B2B: C++ Templates Part 2 Variadic templates: Parameter pack ■ Syntax: A typename|class... Ts generates a type template pa rameter B2B: C++ Templates 2 B2B: C++ Templates Part 2 © 2020 Andreas Fertig https://AndreasFertig.Info post@AndreasFertig.Info 1Variadic templates ■ With C++11, there are variadic templates: ■ Variadic Variadic templates are templates that take any number of parameters. ■ Already known by variadic macros or variadic functions. 1 A Helper functions to convert everything into a std::string 2 auto Normalize(const0 码力 | 12 页 | 787.22 KB | 5 月前3Tornado 6.5 Documentation
up after the client closes the connection (but see that method’s docstring for caveats). 6.1.6 Templates and UI Tornado includes a simple, fast, and flexible templating language. This section describes render. Simply render the template to a string and pass it to RequestHandler. write Configuring templates By default, Tornado looks for template files in the same directory as the .py files that refer handlers). To load templates from a non-filesystem location, subclass tornado.template.BaseLoader and pass an instance as the template_loader application setting. Compiled templates are cached by default;0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
non-Blocking I/O Coroutines Queue example - a concurrent web spider Structure of a Tornado web application Templates and UI Authentication and security Running and deploying Web framework tornado.web — RequestHandler Overriding RequestHandler methods Error Handling Redirection Asynchronous handlers Templates and UI Configuring templates Template syntax Security Internationalization UI modules Authentication and security to clean up after the client closes the connection (but see that method’s docstring for caveats).Templates and UI Tornado includes a simple, fast, and flexible templating language. This section describes0 码力 | 437 页 | 405.14 KB | 2 月前3Implementing C++ Modules: Lessons Learned, Lessons Abandoned
Sample() // Retrieve an RSS feed and print it. { Uri uri(L""); SyndicationClient client; SyndicationFeed feed = co_await client.RetrieveFeedAsync(uri); for (auto&& item : feed.Items()) { hstring engineer ▪ The final throughput gain was had by finding that partial specializations of class templates dominated the compile time ▪ Let’s delay them... 46 (C) Dos Reis & DaCamara; CppCon 2021IDE Experience 0 码力 | 53 页 | 1.33 MB | 5 月前3Guzzle PHP 5.3 Documentation
like reading RFC 3986? Here are some quick examples on how a base_url is resolved with another URI. base_url URI Result http://foo.com /bar http://foo.com/bar http://foo.com/foo /bar http://foo.com/bar ['proxy' => 'tcp://localhost:8125']); Pass an associative array to specify HTTP proxies for specific URI schemes (i.e., “http”, “https”). $client->get('/', [ 'proxy' => [ 'http' => 'tcp://localhost:8125' options **/]) $response = $client->patch('http://httpbin.org/patch', ['body' => 'content']); Request URI The resource you are requesting with an HTTP request is identified by the path of the request, the0 码力 | 63 页 | 275.75 KB | 10 月前3Guzzle PHP 5.3 Documentation
com/guzzle/log-subscriber] Logs HTTP requests and responses sent over the wire using customizable log message templates. OAuth Subscriber [https://github.com/guzzle/oauth-subscriber] Signs requests using OAuth 1.0 like reading RFC 3986? Here are some quick examples on how a base_url is resolved with another URI. base_url URI Result http://foo.com /bar http://foo.com/bar http://foo.com/foo /bar http://foo.com/bar ['proxy' => 'tcp://localhost:8125']); Pass an associative array to specify HTTP proxies for specific URI schemes (i.e., “http”, “https”). $client->get('/', [ 'proxy' => [ 'http' => 'tcp://localhost:8125'0 码力 | 72 页 | 312.62 KB | 10 月前3Comprehensive Rust(English) 202412
struct Foo { val: u8, } pick(123, Foo { val: 7 }, Foo { val: 456 }); • This is similar to C++ templates, but Rust partially compiles the generic function im- mediately, so that function must be valid dependencies. When writing code in Rust, your choices are: • Use gn and ninja with the help of the templates from //build/rust/*.gni (e.g. rust_static_library that we'll meet later). This uses Chromium's audited actions are automatically supported; others require action: build script effect Supported by our gn templates Work required by you Checking rustc version to configure features on and off Yes None Checking0 码力 | 382 页 | 1.00 MB | 10 月前3
共 202 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21