Back to Basics: Templates Part 2## Back to Basics: Templates – Part 2 Bob Steagall CppCon 2021 KEWB COMPUTING ## Recap: Templates ## • C++ supports generic programming with templates • A template is a parametrized description of ## • C++ provides six kinds of templates • Function templates • Class templates • Member function templates • Alias template • Variable templates • Lambda templates ## Recap: Translation Units • way that the class must be complete • The rules for inline variables and functions also apply to templates ## Recap: Template Parameters and Template Arguments templatestruct 0 码力 | 80 页 | 490.15 KB | 1 年前3
Back to Basics: Templates - Part 1## Back to Basics: Templates – Part 1 Bob Steagall CppCon 2021 KEWB COMPUTING ## Overview ## • Rationale • Template fundamentals • Template categories in detail ## Goals and References ## • Goals some important terminology and concepts • Point to next steps ## • Recommended references • C++ Templates The Complete Guide, Second Edition David Vandevoorde, Nicolai M. Josuttis, Douglas Gregor – Addison-Wesley to be known as generic programming C++ supports generic programming with templates ## Template Categories ## Function Templates (C++98/03) ## • Recipes for making functions templateT const& 0 码力 | 68 页 | 436.75 KB | 1 年前3
Back to Basics: C++ Templates - Part 2## B2B: C++ Templates Part 2  Andreas Fertig @Andreas_Fertig https://AndreasFertig.Info post@AndreasFertig.Info ## ## V ariadic templates: Parameter pack ## ■ Syntax: A typename|class... Ts generates a type template parameter pack with optional name. B Args... ts a function argument parameter pack with optional name static_assert(min(3, 2) == 2); ## V ariadic templates ## ■ With C++11, there are variadic templates: Variadic templates are templates that take any number of parameters. - Already known by0 码力 | 12 页 | 787.22 KB | 1 年前3
Back to Basics: C++ Templates - Part 1## B2B: C++ Templates Part 1  Andreas Fertig https://AndreasFertig.Info post@AndreasFertig.Info @Andreas_Fertig 9/d/b/69db0b3fef72f7b5c9930083cfbd2a95/p2_1.jpg) ## Templates Templates are a kind of pattern for the compiler. ■ We can instantiate templates with different types or values. Each instantiation for argument. 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: Function-templates0 码力 | 17 页 | 817.47 KB | 1 年前3
Message Handling with Boolean Algebrato do is to provide and, or, and not class templates that wrap matchers and implement operator() appropriately. The resulting matcher will be an expression template. ## and Matcher 1: templateexpression template. ## Boolean algebra primer/refresher In upcoming slides you'll see some v B reads "A or B" • means not: ¬A reads "not A" ## OK, now what? We have an expression template representing a combination of matchers that can be run on a message.   ## Callable Function Function Overloading Function Object Lambda Expression Coroutine ## Function Overloading Function overloading allows it to create multiple functions (C++20): More constrained function templates are better The full story: Overload resolution on cppreference.com ## Function Overloading ## ■ Functions and function templates void onlyDouble(double){} template0 码力 | 29 页 | 510.47 KB | 1 年前3
Django CMS 2.1.x DocumentationLife is wonderful! os.path.join(PROJECT_PATH, "templates") ) Add at least one template to CMS_Templates; for example: CMS_Templates = ( ('template_1.html', 'Template One') The templates you define in CMS_Templates have to exist at runtime and contain at least one {% placeholder%} template tag to be useful for Django CMS. For more details see Creating templates The Creating templates Django CMS uses templates to define how a page should look and what parts of it are editable. Editable areas are called placeholders. These templates are standard Django templates and you 0 码力 | 63 页 | 485.38 KB | 1 年前3
TiDB v5.2 中文手册版本:5.2.0 警告: 该版本存在一些已知问题,已在新版本中修复,建议使用 5.2.x 的最新版本。 在 5.2 版本中,你可以获得以下关键特性: · 支持基于部分函数创建表达式索引 (Expression index),极大提升查询的性能。 · 提升优化器的估算准确度 (Cardinality Estimation),有助于选中最优的执行计划。 · 锁视图 (Lock View) 成为 GA 是否自动生成TLS证书,默认值为false。表示statement summary tables中保存的SQL种类的最大数量。默认值从200修改为3000。废弃TiDB配置文件中allow-expression-index配置项对请求进行攒批的控制开关,开启后可显著提升写入性能。默认值为true。TiDB 配置文件 security.auto-t 配置文件 stmt-summary.max-stmt-count 修改 TiDB 配置文件 experimental.allow-expression-index 废弃 TiKV 配置文件 raftstore.cmd-batch 新增 0 码力 | 2259 页 | 48.16 MB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
模板特化实例化参数论据模板参数函数模板变量模板默认模板参数variadic templatesfold expressionstemplate template parametersvariable templatesSFINAEC++ Templatesstd::arrayspanTemplate ParametersFunction TemplatesBoolean algebramessage handlingmatchersexpression templatesconstraint expressionsDjangomodelsviewstemplatesformsadminpolymorphismsmart pointersconceptsC++CallableFunctionCoroutineLambda ExpressionFunction OverloadingDjango CMSInstallationIntroductory TutorialTemplatesDatabase ConfigurationTiDBExpression index优化器估算Lock ViewTiFlash













