Noexcept: Enabling Testing of Contract ChecksNoexcept? Enabling Testing of Contract Checks Pablo Halpern and Timur Doumler This work by Pablo Halpern & Timur Doumler is licensed under a Creative Commons Attribution 4.0 International License contracts require good enforcement. • Contract checks help catch bugs early in the process. • Observation: Good enforcement requires good oversight. • Contract checks should themselves be tested. 4-Oct-23 are for • The importance of writing contracts and checking them at run time • How to unit test contract-checking annotations (CCAs) • How noexcept interacts with unit testing of CCAs. We will go over0 码力 | 90 页 | 1.38 MB | 6 月前3
Back to Basics: Smart PointersSmart Pointers Back to Basics Rainer Grimm Training, Coaching, and Technology Consulting www.ModernesCpp.netSmart Pointer A First Overview std::unique_ptr – Exclusive Ownership std::shared_ptr – Concurrency Function Arguments and Return ValuesOverview 4 Smart pointers automatically manage the lifetime of its resource. ▪ Smart Pointers ▪ Allocate und deallocate their resource in the constructor management with reference counting ▪ Are C++ answer to garbage collection ▪ Release the resource if the smart pointer goes out of scope ▪ Are available in four versions raii.cppOverview Name C++ Standard0 码力 | 30 页 | 625.43 KB | 6 月前3
Hiding Your Implementation Details is Not So Simpleinterface, even if they are not defined in the contract. - With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will the required functionality92 Hiding your Implementation Details, Amir Kirsh @ CppCon, 2024 Hiding Smart Pointers and Hierarchies// we want the following code: Expression* e = new Sum ( new Exp(new Number(3) Details, Amir Kirsh @ CppCon, 2024 Why do we use new and delete to begin with? Shouldn’t we use smart pointers? 🤔 Non-symmetric calls to new and delete// what is bothering you with the code below? auto0 码力 | 145 页 | 2.45 MB | 6 月前3
Performance Engineering: Being Friendly to Your Hardwareimplement a SW contract • They do not correspond to the actual execution • Conversion of control flow to a variant of data flow • Really complex • Some operations end here • Can a smart compiler help registers • L/S vs R/M • Flags • Operand count • Destructive destination • Spilling strategy • ISA as a contract 102Vectorization? • The logic of a scalar algorithm applied to a multitude of separate sets . HN H... H2 H1 H2 SN S... S2 S1 Keys 100 (6 + 94) 100 100 5+ 106Why bother? Compiler is smart, one just needs to specify a correct command-line option, no? 107 For vertical operations that0 码力 | 111 页 | 2.23 MB | 6 月前3
Oracle VM VirtualBox 5.2.40 User Manualand higher) Note that the above list is informal. Oracle support for customers who have a support contract is limited to a subset of the listed host operating systems. Also, any feature which is marked as --vrdeproperty "Client/DisableRDPDR=1" disables the VRDE server feature: RDP device redirection for smart cards. To re-enable this feature, use “Client/DisableRDPR=“. • --vrdeproperty "H3DRedirect/Enabled=1" vrdeproperty "Client/DisableRDPDR=1" disables the VRDE server feature: RDP device redirection for smart cards. To re-enable this feature, use “Client/DisableRDPR=“. 150 8 VBoxManage • vrdeproperty "H30 码力 | 387 页 | 4.27 MB | 6 月前3
Oracle VM VirtualBox 5.2.12 User Manualand higher) Note that the above list is informal. Oracle support for customers who have a support contract is limited to a subset of the listed host operating systems. Also, any feature which is marked as --vrdeproperty "Client/DisableRDPDR=1" disables the VRDE server feature: RDP device redirection for smart cards. To re-enable this feature, use “Client/DisableRDPR=“. • --vrdeproperty "H3DRedirect/Enabled=1" vrdeproperty "Client/DisableRDPDR=1" disables the VRDE server feature: RDP device redirection for smart cards. To re-enable this feature, use “Client/DisableRDPR=“. • vrdeproperty "H3DRedirect/Enabled=1"0 码力 | 380 页 | 4.23 MB | 6 月前3
Exceptions Under the SpotlightINBAL LEVIWHO AM I? • AC++ enthusiast. • An embedded software engineer at Solar Edge working on smart home. • One of the organizers of CoreCpp conference and user group. • A Member of WG21. • One of that the cleanup process is now part of the language. • By using “setjmp”, “longjmp” we break the contract between the user and the language. (*) • (*) MSVC supports different behavior – e.g. calling DTORs0 码力 | 53 页 | 2.82 MB | 6 月前3
Back To Basics Functionsthis? ● Again we pass-by-reference to avoid a copy ○ The ‘const’ part is a ‘security’ (i.e. contract) that ensures that whatever data we are passing into that function will not be mutated (i.e. change uct options); ● Another ○ void myFunction(OptionsStruct* options); ○ Pass in as a pointer (or smart pointer) to ensure we’re always just passing in an ‘8-byte’ address (on a 64-bit architecture).0 码力 | 123 页 | 7.26 MB | 6 月前3
Oracle VM VirtualBox 4.2.32 Programming Guide and Referencehelp distinguishing between two editions of the same extension pack where only the license, service contract or something differs. 5.23.1.6 VRDEModule (read-only) wstring IExtPackBase::VRDEModule The name is to be indirectly attached to a virtual machine with snapshots then a special procedure called smart attachment is performed (see below). • Normal differencing hard disks are like normal base hard disks: children and are not attached to virtual machines in snapshots, and indirectly otherwise. Note that the smart attachment procedure is never performed for differencing hard disks. • Immutable hard disks are always0 码力 | 339 页 | 2.07 MB | 6 月前3
Oracle VM VirtualBox 4.3.36 Programming Guide and Referencehelp distinguishing between two editions of the same extension pack where only the license, service contract or something differs. 5.24.1.6 VRDEModule (read-only) wstring IExtPackBase::VRDEModule The name is to be indirectly attached to a virtual machine with snapshots then a special procedure called smart attachment is performed (see below). • Normal differencing hard disks are like normal base hard disks: children and are not attached to virtual machines in snapshots, and indirectly otherwise. Note that the smart attachment procedure is never performed for differencing hard disks. • Immutable hard disks are always0 码力 | 376 页 | 1.99 MB | 6 月前3
共 172 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18













