 Back To Basics Lifetime Management0 码力 | 66 页 | 8.43 MB | 6 月前3 Back To Basics Lifetime Management0 码力 | 66 页 | 8.43 MB | 6 月前3
 Compile-Time Compression and Resource Generation with C++20that take a user-suppiled lambda to generate the data needed to render our desired compile-time resource! These are e�ectively templated functions, but we will use the cleaner auto parameter syntax for0 码力 | 59 页 | 1.86 MB | 6 月前3 Compile-Time Compression and Resource Generation with C++20that take a user-suppiled lambda to generate the data needed to render our desired compile-time resource! These are e�ectively templated functions, but we will use the cleaner auto parameter syntax for0 码力 | 59 页 | 1.86 MB | 6 月前3
 Libraries: A First Step Toward Standard C++ Dependency Management1October 3, 2023 2 Libraries: A First Step Toward Standard C++ Dependency Management Bret Brown, C++ Infrastructure Lead, Bloomberg Bill Hoffman, CTO, KitwareHello! Welcome! Bret Brown C++ Infrastructure portable as the code they contain! ● ✓ Projects should be “cattle,” not “pets”! 7Why dependency management? 8Consensus: Managing dependencies == way too hard Q: Which of these do you find frustrating names: jsonlogConfig.cmake Jsonlog-config.cmake # ... CMake gives you some dependency management tips here ... 13 Aside: Coloring and bolding added for emphasisMotivation: What would we design0 码力 | 82 页 | 4.21 MB | 6 月前3 Libraries: A First Step Toward Standard C++ Dependency Management1October 3, 2023 2 Libraries: A First Step Toward Standard C++ Dependency Management Bret Brown, C++ Infrastructure Lead, Bloomberg Bill Hoffman, CTO, KitwareHello! Welcome! Bret Brown C++ Infrastructure portable as the code they contain! ● ✓ Projects should be “cattle,” not “pets”! 7Why dependency management? 8Consensus: Managing dependencies == way too hard Q: Which of these do you find frustrating names: jsonlogConfig.cmake Jsonlog-config.cmake # ... CMake gives you some dependency management tips here ... 13 Aside: Coloring and bolding added for emphasisMotivation: What would we design0 码力 | 82 页 | 4.21 MB | 6 月前3
 Back to Basics: Designing Classes (part 1 of 2)Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization0 码力 | 87 页 | 5.64 MB | 6 月前3 Back to Basics: Designing Classes (part 1 of 2)Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization0 码力 | 87 页 | 5.64 MB | 6 月前3
 Back to Basics: Designing Classes (part 2 of 2)Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization0 码力 | 76 页 | 2.60 MB | 6 月前3 Back to Basics: Designing Classes (part 2 of 2)Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization0 码力 | 76 页 | 2.60 MB | 6 月前3
 Delivering safe C+++ community There is no C/C++ language. Write contemporary C++ An opportunityComplete type-and-resource safety • Is an ideal (aim) of C++ • From very early on (1979) • But “being careful” doesn’t scale achieving that can be found in A brief introduction to C++'s model for type- and resource-safety (2015) and Type-and-resource safety in modern C++ (2021). • No limitations of what can be expressed • Compared October 2023 7Type-and-resource safety • Every object is accessed according to the type with which it was defined (type safety) • Every object is properly constructed and destroyed (resource safety) • Every0 码力 | 74 页 | 2.72 MB | 6 月前3 Delivering safe C+++ community There is no C/C++ language. Write contemporary C++ An opportunityComplete type-and-resource safety • Is an ideal (aim) of C++ • From very early on (1979) • But “being careful” doesn’t scale achieving that can be found in A brief introduction to C++'s model for type- and resource-safety (2015) and Type-and-resource safety in modern C++ (2021). • No limitations of what can be expressed • Compared October 2023 7Type-and-resource safety • Every object is accessed according to the type with which it was defined (type safety) • Every object is properly constructed and destroyed (resource safety) • Every0 码力 | 74 页 | 2.72 MB | 6 月前3
 Modern C++ Tutorial: C++11/14/17/20 On the Fly. . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Chapter 05 Smart Pointers and Memory Management 57 5.1 RAII and Reference Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ue; } This will iterate over the tuple: 56 Conclusion CHAPTER 05 SMART POINTERS AND MEMORY MANAGEMENT for(int i = 0; i != tuple_len(new_tuple); ++i) // runtime indexing std::cout << tuple_index(new_tuple we have other methods that we can implement on our own. Chapter 05 Smart Pointers and Memory Management 5.1 RAII and Reference Counting Programmers who understand Objective-C/Swift/JavaScript should0 码力 | 92 页 | 1.79 MB | 1 年前3 Modern C++ Tutorial: C++11/14/17/20 On the Fly. . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Chapter 05 Smart Pointers and Memory Management 57 5.1 RAII and Reference Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ue; } This will iterate over the tuple: 56 Conclusion CHAPTER 05 SMART POINTERS AND MEMORY MANAGEMENT for(int i = 0; i != tuple_len(new_tuple); ++i) // runtime indexing std::cout << tuple_index(new_tuple we have other methods that we can implement on our own. Chapter 05 Smart Pointers and Memory Management 5.1 RAII and Reference Counting Programmers who understand Objective-C/Swift/JavaScript should0 码力 | 92 页 | 1.79 MB | 1 年前3
 The Roles of Symmetry And Orthogonality In DesignOrthogonality In Design cppcon 2021 Either you keep self improving, or it's time to move into management. --Niall Douglas 30-Sep-2021 https://old.reddit.com/r/cpp/comments/pye3iv/c_commi ttee_dont Orthogonality In Design cppcon 2021 Symmetry In C++ Code • C++’s most common symmetry example: Resource Management ... { Bar b; //...do stuff with b } Enter the block, object is created Leave the block Orthogonality In Design cppcon 2021 Symmetry In C++ Code • C++’s most common symmetry example: Resource Management ... { Bar b; //...do stuff with b } Enter the block, object is created Leave the block0 码力 | 151 页 | 3.20 MB | 6 月前3 The Roles of Symmetry And Orthogonality In DesignOrthogonality In Design cppcon 2021 Either you keep self improving, or it's time to move into management. --Niall Douglas 30-Sep-2021 https://old.reddit.com/r/cpp/comments/pye3iv/c_commi ttee_dont Orthogonality In Design cppcon 2021 Symmetry In C++ Code • C++’s most common symmetry example: Resource Management ... { Bar b; //...do stuff with b } Enter the block, object is created Leave the block Orthogonality In Design cppcon 2021 Symmetry In C++ Code • C++’s most common symmetry example: Resource Management ... { Bar b; //...do stuff with b } Enter the block, object is created Leave the block0 码力 | 151 页 | 3.20 MB | 6 月前3
 Exceptionally Bad: The Story on the Misuse of Exceptions and How to Do Bettercode ? 26 Bloomberg Exceptional DefinitionSituation : Need to explicitly give back / release a resource acquired during an operation before leaving the function / exception block. Exceptions can leave catches the exception, releases a resource and usually rethrows the exception 27 Bloomberg Exceptional Resource Management30 Bloomberg Exceptional Resource Management int process_file(const std::string& std::exception& e) { ::fclose(f); throw; } ::fclose(f); return rc; } Resource release Bug31 Bloomberg Exceptional Resource Management Use RAII : struct FileManager { FileManager(const std::string& fileName_)0 码力 | 85 页 | 2.32 MB | 6 月前3 Exceptionally Bad: The Story on the Misuse of Exceptions and How to Do Bettercode ? 26 Bloomberg Exceptional DefinitionSituation : Need to explicitly give back / release a resource acquired during an operation before leaving the function / exception block. Exceptions can leave catches the exception, releases a resource and usually rethrows the exception 27 Bloomberg Exceptional Resource Management30 Bloomberg Exceptional Resource Management int process_file(const std::string& std::exception& e) { ::fclose(f); throw; } ::fclose(f); return rc; } Resource release Bug31 Bloomberg Exceptional Resource Management Use RAII : struct FileManager { FileManager(const std::string& fileName_)0 码力 | 85 页 | 2.32 MB | 6 月前3
 Practical memory pool based allocators for Modern C++Inc.Autosar C++ guidelines Rule A18-5-5 (required, implementation, partially automated) Memory management functions shall ensure the following: ● deterministic behavior resulting with the existence of A18-5-7 (required, implementation, non-automated) If non-realtime implementation of dynamic memory management functions is used in the project, then memory shall only be allocated and deallocated during only the size in bytes is given © 2020 Apex.AI, Inc. N.B. This also mimics how std::pmr::memory_resource defines the allocation interfacememory_pool::allocate() Closer to a real one struct info {0 码力 | 49 页 | 986.95 KB | 6 月前3 Practical memory pool based allocators for Modern C++Inc.Autosar C++ guidelines Rule A18-5-5 (required, implementation, partially automated) Memory management functions shall ensure the following: ● deterministic behavior resulting with the existence of A18-5-7 (required, implementation, non-automated) If non-realtime implementation of dynamic memory management functions is used in the project, then memory shall only be allocated and deallocated during only the size in bytes is given © 2020 Apex.AI, Inc. N.B. This also mimics how std::pmr::memory_resource defines the allocation interfacememory_pool::allocate() Closer to a real one struct info {0 码力 | 49 页 | 986.95 KB | 6 月前3
共 177 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18
相关搜索词
 BackToBasicsLifetimeManagementCompileTimeCompressionandResourceGenerationwithC++20LibrariesFirstStepTowardStandardDependencytoDesigningClassespartofDeliveringsafeModernTutorial111417OntheFlyTheRolesSymmetryAndOrthogonalityInDesignExceptionallyBadStoryonMisuseExceptionsHowDoBetterPracticalmemorypoolbasedallocatorsfor














 
 