lass Y {intdata;// private member// the non-member function operator<< will have access to Y's private membersfriendstd::ostream&operator<<(std::ostream& out,constY& o);friendchar*X::foo(int);// members of other classes can be friends toofriendX::X(char), X::~X();// construct...
push_back(std::move(worker)); // 线程被 push 到 vector 中了……但是,RAII works! } 上例中,线程被移除或者 vector 生命周期结束等等,std::jthread 的析构函数仍然会被调用,线程依旧会 join。 RAII 例:std::unique_ptr std;:unique_ptr 也是一个 RAII 类,它可以为你管理指针。默认地,它会调用...
template<typenameT>voidf(T&&);template<typenameT>voidg(constT&&); s x;f(s());// Ok, T = sf(x);// Ok, T = s&g(s());// Ok, T = sg(x);// Error, binding lvalue to rvalue, T = s https://www.codesynthesis.com/~boris/blog/2012/07/24/const-rvalue-references/ 9.移动...
视频原链接: CppCon 2019: Klaus Iglberger “Back to Basics: Move Semantics (part 1 of 2)图片原链接: github/back_to_basics_move_semantics_part_1klaus_iglbergercppcon_2019.pdf假设现在有两个vector变量…
36. Ben Saks - Back to Basics: Understanding Value Categories 37. Hyrum Wright Time Travel: Applying Gradual Typing to Time Types with Clang's LibTooling 38. Phil Nash - The Dawn of a New Error 39. Brian Ruth - Infiltrating a Code Base: Moving Toward a Better C ...
Back to Basics - Smart Pointers by Rainer Grimm [more materials] Back to Basics - Templates (part 1) by Andreas Fertig Back to Basics - Templates (part 2) by Andreas Fertig Back to Basics - The Abstract Machine by Bob Steagall Back to Basics - The Structure of a Program by Bob Steagal...
Also, my CppCon talks are all up on the CppCon YouTube channel. You can find them here: Back to the Basics! Essentials of Modern C++ Style: Loops, pointers and references, smart pointers, variable declarations, and parameter passing Lock-Free Programming
CppCon 2017 Fedor Pikus C++ atomics from basic to advanced. 184 -- 3:01:21 App 【CppCon2020】Back to Basics Class Layout - Stephen Dewhurst 90 -- 1:26:57 App Best of Tiësto - Tiësto Mix 2021 155 -- 38:28 App 2022 Future Hits - Spinnin' Records 4847 3 48:54 App 新手需要...
Back To Basics: OOPby Jon Kalb Back to Basics: RAII and the Rule of Zeroby Arthur O’Dwyer Back to Basics: Smart Pointersby Arthur O’Dwyer Back to Basics: Test-Driven Developmentby Fedor Pikus Back To Basics: The Best Parts of C++by Jason Turner ...
So I suggested that maybe we ought to repurpose my Friday plenary session with the other highly-requested topic instead, andthe organizers agreed. Here’s the new description: Back to the Basics! Elements of Modern C++ Style by Herb Sutter ...