Back to Basics Concepts
requires expression Concept (named requirements) // OK, uses 1st add() calling push_back() // OK, uses 2nd add() calling insert() Nico Josuttis C++ Concepts @cppcon 2024-09-18 3©2024 by josuttis.com 7 C++ coll2; add(coll1, 42); // OK, uses 1st add() calling push_back() add(coll2, 42); // OK, uses 2nd add() calling insert() C++20 C++20 Type Constraints with concepts applied to types Requirements 42); add(coll2, 42); // C++20 C++20 // ERROR: "can't call insert()" // OK, uses 2nd add() calling insert() 2nd add() is used, because concept for 1st add() not satisfied Requirements not met =>0 码力 | 23 页 | 2.14 MB | 5 月前3Performance Engineering: Being Friendly to Your Hardware
eax, edi shl eax, 4 add eax, esi ret ... Flush, update branch history, refetchExample – branching, 2nd attempt 72 uint32_t fn(uint32_t x, uint32_t y, size_t cond) { if (cond == 27) return (x << 4) 89 F8 C1 E0 04 01 F0 EB 06 89 F8 D1 E8 29 F0 C3 66 66 0F 1F 84 00 00 00 00 00Example – branching, 2nd attempt 73 uint32_t fn(uint32_t x, uint32_t y, size_t cond) { if (cond == 27) return (x << 4) 89 F8 C1 E0 04 01 F0 EB 06 89 F8 D1 E8 29 F0 C3 66 66 0F 1F 84 00 00 00 00 00Example – branching, 2nd attempt 74 uint32_t fn(uint32_t x, uint32_t y, size_t cond) { if (cond == 27) return (x << 4)0 码力 | 111 页 | 2.23 MB | 5 月前3Back to Basics - Function Call Resolution
the 2nd function: f(1.1, 2, 3); // calls f(double, int, double) The conversions are the same for both functions on the 1st and 3rd arguments. The 2nd function is a better match on the 2nd (middle)0 码力 | 44 页 | 1.30 MB | 5 月前3High-Performance Cross-Platform Architecture: C++20 Innovations
Object-Oriented Software Construction (2nd ed.)Meyer OPC: Adapting a Module to New Clients (After) Meyer, B. (1997). Object-Oriented Software Construction (2nd ed.)OCP in C++: Strong and Weak Principles0 码力 | 75 页 | 581.83 KB | 5 月前3Modern C++ Iterators
<< '\n'; } // print every 2nd element (array, vector, deque only): for (auto pos = coll.begin(); pos < coll.end(); pos += 2) { std::cout << *pos << '\n'; } // print every 2nd element (for all containers):0 码力 | 24 页 | 1.93 MB | 5 月前3Design Patterns
user group Chair of the CppCon Back-to-Basics track Email: klaus.iglberger@gmx.deThe 2nd in a Row 3The 2nd in a Row 45 Let’s again talk about design patterns and virtual functionsThe Overhead0 码力 | 136 页 | 7.95 MB | 5 月前3Taming the C++ Filter View
// OK, calls 2nd print() print(vec | std::views::filter(gt9)); // OK, calls 1st print() print(getColl()); // OK, calls 2nd print() print(getColl() | s0 码力 | 43 页 | 2.77 MB | 5 月前3Modern C++ for Parallelism in High Performance Computing
location in an output array from a small number of points in an input array. In our benchmark we use the 2nd order Laplace operator: ∀i,j : yij ← 4xij −xi−1,j −xi+1,j −xi, j−1 −xi,j+1 where i, j can jointly0 码力 | 3 页 | 91.16 KB | 5 月前3金融级云原生 PaaS 探索与实践
Replica/Partition Allocator Pod A-1 Pod A-2 Pod A-3 Pod A-4 Pod A-5 Beta Group 1st Group 2nd Group InPlaceSet A CafeDeployment partition:1 …… Pod Upgrade 机房A – 单元A • 精准分组,自定义拓扑 • IP不变,无损升级0 码力 | 20 页 | 1.71 MB | 5 月前3From Your First Line of Code to Your Largest Repo: How Visual Studio Code Can Help You Develop More Efficiently in C++
feature requests Come chat with us about future ideas and what you’d like to see!Our sessions Monday 2nd • Lifetime Safety in C++ – Gabor Horvath • Informal Birds of a Feather for Cpp2/cppfront – Herb Sutter0 码力 | 31 页 | 2.76 MB | 5 月前3
共 70 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
相关搜索词