A Journey Into Non-Virtual PolymorphismRud Merriam | A Journey into Non-Virtual Polymorphism 2 Who Doesn’t Recognize This?? 1990 Borland Turbo C++Cppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 3 Background ● Experience – Medium.com (https://medium.com/@rudmerriam)Cppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 4 Polymorphism ● Greek: “many forms” (Obligatory statement) ● The use of a single variableCppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 5 Polymorphic Variables ● Base class pointer to derived class – Virtual functions are not bad! ● Standard Template Library0 码力 | 43 页 | 536.84 KB | 6 月前3
Optimizing Away Virtual Functions May Be PointlesscarePhoto by Tech Nick on unsplashSimple benchmark class Base { public: int concrete() const; virtual int virt() const; }; void benchmark(Base *b, size_t num_iterations) { auto start = Clock::now(); virt_duration = end-start;There are interesting technical details and surprising conclusions that virtual functions can be actually faster. Since CPU architectures are mentioned, I'd expect to see deep nt-vs-inheritance-vs-other- ways-performanceDoes it even matter?Conclusions ● The notion that “virtual functions are slower” is flat out wrong. ○ Which is not to say they are faster ○ Some of the suggested0 码力 | 20 页 | 1.19 MB | 6 月前3
BehaviorTree.CPP: Task Planning for Robots and Virtual Agentsname, const NodeConfig& config) : SyncActionNode(name, config) {} // You must override this virtual function NodeStatus tick() override { std::cout << "Type: [ApproachEnemy]. Instance:" <<0 码力 | 59 页 | 7.97 MB | 6 月前3
Common Package Specification (CPS) in Practice: A Full Round Trip Implementation in Conan C++ Package ManagerPackage Specification (CPS) in practice: A full round trip implementation in Conan C++ package manager CppCon24Outline - Introduction to Common Package Specification (CPS) - Creation of CPS files from0 码力 | 66 页 | 1.76 MB | 6 月前3
Cetting Started with C++reuse with libraries Finding Libraries About Libraries Managing LibrariesInstalling a package manager vcpkg Windows: iex (iwr -useb "https://aka.ms/vcpkg-init.ps1") Linux/macOS: source <(wget -O com/Microsoft/vcpkg Go Deeper vcpkg on Microsoft Learn - https://learn.microsoft.com/vcpkgInstalling a package manager Conan Install Python 3 and pip pip install conan https://github.com/conan-io/conan Go Deeper also /analyze /analyze:plugin EspxEngine.dll • GCC / Clang -Werror -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedanticStatic Analysis Compiler Linker Primary Source File Object File Application0 码力 | 95 页 | 4.71 MB | 6 月前3
Conan 2.10 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Decentralized package manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Binary management Welcome! This is the user documentation for Conan, an open source, decentralized C/C++ package manager that works in all platforms and with all build systems and compilers. Other relevant resources: Documentation, Release 2.10.1 2 CONTENTS CHAPTER ONE INTRODUCTION Conan is a dependency and package manager for C and C++ languages. It is free and open-source, works in all platforms ( Windows, Linux, OSX0 码力 | 803 页 | 5.02 MB | 10 月前3
Conan 2.9 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Decentralized package manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Binary management Welcome! This is the user documentation for Conan, an open source, decentralized C/C++ package manager that works in all platforms and with all build systems and compilers. Other relevant resources: Documentation, Release 2.9.3 2 CONTENTS CHAPTER ONE INTRODUCTION Conan is a dependency and package manager for C and C++ languages. It is free and open-source, works in all platforms ( Windows, Linux, OSX0 码力 | 795 页 | 4.99 MB | 10 月前3
Conan 2.8 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Decentralized package manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Binary management Welcome! This is the user documentation for Conan, an open source, decentralized C/C++ package manager that works in all platforms and with all build systems and compilers. Other relevant resources: Documentation, Release 2.8.1 2 CONTENTS CHAPTER ONE INTRODUCTION Conan is a dependency and package manager for C and C++ languages. It is free and open-source, works in all platforms ( Windows, Linux, OSX0 码力 | 785 页 | 4.95 MB | 10 月前3
Conan 1.20 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Decentralized package manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Binary management variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 10.5 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 14.22 How to use Conan as other language package manager . . . . . . . . . . . . . . . . . . . . . . . . . 284 14.23 How to manage SSL (TLS) certificates0 码力 | 611 页 | 4.89 MB | 1 年前3
Conan 1.19 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Decentralized package manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Binary management variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 10.5 Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 14.22 How to use Conan as other language package manager . . . . . . . . . . . . . . . . . . . . . . . . . 284 14.23 How to manage SSL (TLS) certificates0 码力 | 609 页 | 4.88 MB | 1 年前3
共 208 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21













