C++高性能并行编程与优化 - 课件 - Zeno 中的现代 C++ 最佳实践 这就构成了 CRTP 的两大常见用法: • 1. 更高性能地实现多态。 • 2. 伺候一些无法定义为虚函数的函数,比如拷贝构造,拷贝赋值等。 • https://www.jianshu.com/p/ec8a01cba496 CRTP 的一个注意点:如果派生类是模板类 • 如果派生类 Derived 是一个模板类,则 CRTP 的那个参数应包含派生类的模板参数,例 如: • template 他们还有一些成员函数,这些函数可能是虚函数,也可能不是。 • 如何在不知道 OpenVDB 每个类具体继承关系的情况下,实现我们想要的继承关系,从而 实现封装和代码重用?简单,只需用一种被小彭老师称为类型擦除 (type-erasure) 的大法 。 类型擦除:还是以猫和狗为例 • 例如右边的猫和狗类,假设这两个类是某个第 三方库里写死的,这个第三方库的作者可能没 上过《面向对象程序设计》,居然没有定义一 个公用的 Animal0 码力 | 54 页 | 3.94 MB | 1 年前3
C++23: An Overview of Almost All New and Updated Featuresstd::spanstream std::byteswap() std::to_underlying() Associative Containers Heterogeneous Erasure Removed Features Garbage Collection SupportC++23 Core Language6 Agenda C++23 Core Language std::spanstream std::byteswap() std::to_underlying() Associative Containers Heterogeneous Erasure Removed Features Garbage Collection Support7 Explicit Object Parameters Instead of implicit std::spanstream std::byteswap() std::to_underlying() Associative Containers Heterogeneous Erasure Removed Features Garbage Collection Support13 if consteval Syntax: if consteval { /* A0 码力 | 105 页 | 759.96 KB | 6 月前3
C++20 STL Features: 1 Year of Development on GitHubextension)) { continue; } // ... } }15 Erasing Elements16 Container Erasure Strategies • Erasing unwanted elements before C++20: • vector-like: erase-remove idiom • list-like: Invalidating iterators while looping 🐞 • Skipping elements while looping 🐞17 Uniform Container Erasure • GH-236 and GH-566 implemented by SuperWig #include#include #include } } // ... similarly for _Value > _Ty{_Rx_max} ... return true; }40 Associative Erasure • std::erase_if() is linear time • Inspects the entire value_type • Associative containers have 0 码力 | 45 页 | 702.09 KB | 6 月前3
唐刚 - Use Rust to Develop the Decentralized Open Data Application - RustChinaConf2023to develop the Data-kind Decentralized Application. You can use the traditional Web development coding style to develop a ODA. How to develop Open Data Application The EightFish Application Components0 码力 | 30 页 | 2.53 MB | 1 年前3
whats new in visual studioStudio IDE 5. by continuing to enhance the C++ experience for Visual Studio Code CppCon 2021 Happy Coding! Thank you Enjoy the rest of the conference! Join #visual_studio channel on CppCon Discord https://aka0 码力 | 42 页 | 19.02 MB | 6 月前3
Zadig 产品使用手册CI/CD 工具额外 搭建全流程能力 专门面向开发者的生产力平台,涵盖需求到开 发,测试,运维的云原生一体化技术底座支撑 云厂商 DevOps 平台 华为云 DevCloud 阿里云效 腾讯 CODING 云厂商引流为主,锁定风险高 对多云跨地域支持不够 实施负担较重难以推广 面向多云友好,厂商中立,全球多地跨云跨域 安全可靠自动化部署 云原生 CI/CD 工具 Tekton Argo0 码力 | 52 页 | 22.95 MB | 1 年前3
Zadig 面向开发者的云原生 DevOps 平台工具额外搭建 全流程能力 专门面向开发者的生产力平台,涵盖全流程需求到 开发,测试,运维的云原生一体化技术底座支撑 云厂商 DevOps 平台 华为云 DevCloud 阿里云效 腾讯 CODING 容器云厂商 云厂商引流为主,锁定风险高 对多云跨地域支持不够 实施负担较重难以推广 面向多云厂商友好,实施迁移成本极低,可扩展性 强,全球多地跨云跨域安全可靠自动化部署 企业基于0 码力 | 59 页 | 81.43 MB | 1 年前3
共 7 条
- 1













