Learn C++ Through Projects @CppWithProjects
Learn to write idiomatic, performing, well-tested code that can be shipped to production 🚀 learncppthroughprojects.com Joined September 2020-
Tweets35
-
Followers180
-
Following131
-
Likes7
The `explicit` keyword prevents unwanted type conversions. Class ctors that only take 1 param are special: They could be used to perform type conversions. If the ctor is marked as `explicit`, the conversion can only happen... well, explicitly. #learntocode #cpp #cplusplus
Pro tip #1: Use std::make_unique and std::make_shared to avoid explicit calls to `new`, so the object lifetime is fully tied to the lifetime of the smart pointer. Pro tip #2: Be mindful that shared_ptr has the additional cost of maintaining a reference count of its clones.
std::shared_ptr is the opposite. You can copy a shared_ptr as many times as you want: Each pointer points to the same object. When a shared_ptr goes out of scope, the pointed-to object is only destroyed if no other shared_ptr is pointing to it (shared_ptr keeps the count).
How smart is a C++ smart pointer? If you init a raw pointer with `new`: int* ptr = new int; then you must call `delete ptr` when you don't need it anymore. This is error prone! ❗️Smart pointers handle the lifetime of the pointed-to object for us. #cpp #cplusplus #learntocode
📖 A general guiding principle: If the code that generates the error is close to the expected error handler and in a tight loop → Return error codes. If the code that generates the error is far from the code that should handle it → throw an exception.
Broadly speaking, an exception that never throws has an insignificant runtime performance cost. A common alternative (returning error codes) has the fixed cost of checking for errors at every call. The best performance trade-off can only be informed by your own measurements.
How do exceptions work in C++? An exception is like a videogame checkpoint: We tell the program that if something goes wrong, we want to be taken back to the checkpoint. The path back to the checkpoint is not always easy though... #cpp #cplusplus #learntocode 🧵
With cmake_paths, conan downloads dependencies and lists their paths in a conan_paths.cmake file. If you include the file, CMake looks for dependencies in the conan folders. Without the file, CMake reverts to the default search paths, as usual.
If you want to use conan as a C++ package manager but don't want your CMake build system to depend on it, you can use the "cmake_paths" generator. #cpp #cplusplus #cmake #conan
@alcampk Do a full codebase refactoring every 6 months, or every 3 months if you live in an area with very hard water
@shafikyaghmour It would probably escape tests with that if logic — the fun begins if f() had opposite logic!
We can still prevent the copy. Since C++14, we can initialize lambda captures with anything — including with a move assignment: auto printValue = [captured = std::move(value)] (...) { ... };
When creating lambdas, we often capture variables by reference to avoid unnecessary copies, but we need to be careful with the *lifetime* of the captured variable. 🚨 In the snippet below, `value` has gone out of scope by the time the lambda is called. #cpp #cplusplus
@DrAuraHxC Thank you for your support, it is really appreciated! We will be sending out a newsletter update in the first week of November, with a sneak peak as well 👀
@PeterSommerlad A type in this case!
rvalue references can be confusing! 👀 In the code below, is the the `Container&& cont` parameter copied or moved into the `local` variable? (assuming `Container` has both copy and move ctors) #cpp #cplusplus
We can call `std::move(cont)` and make sure that the move ctor is called instead. Because `print_value` takes an rvalue reference, it is understood that it can modify the `cont` object — even take ownership of it.
`cont` is copied into `local`, not moved. As a function arg, `cont` **accepts** rvalue references — that's why we pass a temporary to it in main. But in the context of the print_value function, `cont` is an lvalue, and so it initializes `local` through the Container copy ctor.
Harry Tenkeu @Harry_Tenkeu
1 Followers 27 Following
Sergio Rioja @SerRioja
29 Followers 212 Following 🗻 🌲 💓 No tengo ninguna relación con @RadioRioja ni con @La_SER
Disang Augustus @AugustusMHK
1 Followers 112 Following
tdzaan @tdzaan
0 Followers 36 Following
Mr black @Mrblack63662826
4 Followers 260 Following
krishgoutam@12 @HarishGout37093
0 Followers 6 Following learning programming to Build something and able to solve problem .
blllackhayate @jeongmo4eva
8 Followers 49 Following
Green man @Green__ball_
0 Followers 13 Following
Blirto @Blirto488857
107 Followers 3K Following
Ezropo @Ezropo5755517
97 Followers 3K Following
Kuifui @Kuifui01680
103 Followers 3K Following
Alfreemqe @Alfreemqe27386
24 Followers 2K Following
Ella Jack @user_2901
2 Followers 27 Following
Shivam Yadav @ShivamY67590592
0 Followers 20 Following
Logan @Logan7680
0 Followers 24 Following Confidence in all that you are doing, your dream is your future, and your future is your life.
Alexander Ocsa @aocsa
637 Followers 4K Following Staff Software Engineer at @voltrondata. open-source: @ApacheArrow, @Pytorch, @blazingsql, @rapidsai, @laboratoriala
Piyush Prem @PiyushPrem14
11 Followers 439 Following None of the views are own,all generated by bot mimicking human😗
manojvarma2810 @manojvarma2810
2 Followers 46 Following
coffeecup @coffeecup010203
0 Followers 5 Following
Arul @Arul74749887159
0 Followers 8 Following
Brennan Fehoko @fehoko02
0 Followers 10 Following
Chit 🤍 @TouchMakar
14 Followers 98 Following
Ankit Rawat @ankitraw09
2 Followers 29 Following I am enthusiastic, optimistic,tall 6ft, with COMPUTER SCIENCE background..strong desire to learn new things but lacking due to absence of clarity.
Hector Monsivais @elMonsiMX
103 Followers 384 Following
Sek Sek @SekSek118004
0 Followers 7 Following
Doks @Nieeveesss
9 Followers 95 Following
Luca @Luca22442567
1 Followers 9 Following
jfml @Javi_Mali
48 Followers 1K Following
ydnakif @ydnakif
0 Followers 234 Following
light @a29276618
0 Followers 461 Following
Carlos Piñon Onofre @cponofre
7 Followers 107 Following
AFather.Victimof.Iris... @veganvictimofp
0 Followers 4K Following Hindu,Jain,Sikhs,Irish pimps of police & Patrick Goss R murdering me & doing ethnic cleansing of my children after covering up rape of my wife by German-Am Nazi
Stanley 🪖 @NoupingStanley
199 Followers 1K Following FrontEnd Developer Deeping into Nextjs and Reactjs
Vinnie Falco 🍊 @FalcoVinnie
2K Followers 120 Following https://t.co/4h6OXX33yK https://t.co/zWYzBXRW8V
Antonia Forster @AntoniaRForster
12K Followers 2K Following Senior XR Engineer @Avantis | ex-Unity | TED Speaker | Award-Winning Director of https://t.co/WQAghCpyZF | https://t.co/MLqv1G7PkJ | Opinions my own 🌈
Marius Băncilă 🇷... @mariusbancila
2K Followers 97 Following Software architect, author, engineer, Microsoft MVP for developer technologies.
4n6lady @4n6lady
63K Followers 659 Following #DFIR & #BlueTeam | IR & Threat Detection | #OSINT enthusiast | waiting for HL3 | AWS CIRT - my views are my ownGuido van Rossum @gvanrossum
308K Followers 482 Following Python's BDFL-emeritus, Computer History Museum Fellow. Opinions are my own. He/him.
sbi @tweetsbi
840 Followers 374 Following I'm the Grumpy Old Ape, father of many, avid reader, lover of C++, writing 24/7 software that keeps your lights on. he/him [email protected]
𝓣𝓱𝓮 𝓠𝓾... @Nazeephie
97K Followers 11K Following The Paper Alchemist - Bn Hassan | #FUD Alumni | #Islam | Ambivert | #Bsc Computer Science | #Poet by soul | لَا حَوْلَ وَلَا قُوَّةَ إِلَّا بِاللَّهِ 😊✨
HsiangHui @hsianghui
8K Followers 3K Following Lecturer, PhD, Mobile App Developer. Interested in Analytics, Marketing, Coding, Entrepreneurship, EdTech, NLP
ɹǝqıl [-: uıʌǝu @nliber
820 Followers 5K Following I am a figment of my own imagination; everything else is real.
Jerry Wiltse @solvingj
232 Followers 339 Following Currently Focused on Large Scale Automated Builds of C and C++ Software
Lasote @lasote
436 Followers 342 Following Software Engineer at JFrog. Conan C/C++ package manager co-founder
conan.io @conan_io
4K Followers 1K Following C and C++ portable, decentralized, FOSS package manager for developers
Core C++ @corecpp
10K Followers 32 Following The Core C++ Users Group is dedicated to bringing the C++ developer community together with monthly meetings of high quality talks and activities.
Hana Dusíková 🦋 ... @hankadusikova
6K Followers 564 Following she/her, author of CTRE library, moved to bsky https://t.co/AvAm5pKniQ
Michael Price @michaelpricedev
228 Followers 111 Following Experienced Software Engineer, Agile Methodology Ninja, Language Aficionado. Program Manager @ Microsoft DevDiv, focused on C++. Opinions are my own.
Andreas Fertig @Andreas__Fertig
4K Followers 361 Following Trainer, Speaker, Programmer all around C++ and Embedded Systems. Creator of https://t.co/aZSlIpLbPm https://t.co/FYaxam7A2s
Christian Schmidt (@c... @cwschmidt
465 Followers 281 Following Software Engineer | C | C++ | Objective-C | Java | Linux | Mac | Windows | Refactoring | Testing | Networking | Multithreading | DRY | KISS | YAGNI
Felipe O. Carvalho @_Felipe
5K Followers 3K Following @ApacheArrow / Databases / Compilers. (past @SDFLabs, VoDa, @Spotify). Rust/C++/TLA⁺🇧🇷 → 🇸🇪 → 🌎
Victor Ciura @ciura_victor
4K Followers 674 Following Technical Lead for Rust Program @ Microsoft • C++ ↔️ Rust Tooling (DevDiv), ex @visualc team, ex @caphyon, ex @advinst lead, @ClangPowerTools creator
Clang Power Tools @ClangPowerTools
639 Followers 3 Following On a mission to bring clang-tidy magic to Visual Studio C++ developers, increase your productivity and modernize your code. Developed by @Caphyon
Tina Ulbrich 🏳️�... @_Yulivee_
1K Followers 306 Following C++ developer, university degree in Bio-Mathematics, maths and computer nerd 🤓 she/her
Kab Adaephon Delat (@... @kaboissonneault
405 Followers 918 Following Systems programmer at @Behaviour. Daggerfall Unity maintainer. '93 kid. Retro RPG enjoyer, drummer, and master over twelve Warrens. He/him
Sean Murthy 🇺🇦 ... @smurthys
500 Followers 102 Following @sigcpp, Data Systems & Solutions Lab (DASSL). C++, SW eng, data mgmt, teaching Personal health, finance Engagement ≠ endorsement Also @[email protected]
Special Interest Grou... @sigcpp
577 Followers 31 Following Teaching, learning, and practicing modern C++ Moderated by @smurthys Mastodon: @[email protected] BlueSky: @sigcpp.bsky.social
Manning Publications @ManningBooks
31K Followers 2K Following Follow Manning Publications on X and get exclusive discounts, product announcements, author news, and great content.
Doctavius Auxiliary @Lone_Hawke
1K Followers 1K Following DJ Doc Aux | Software Engineer | Public Speaker | Inventor | Silat Practitioner
Cain Maddox @ctrlshifti
60K Followers 263 Following https://t.co/yO4cPzMSTo https://t.co/uU4TRYk3gv i don't check my dms. for inquiries, email me at [email protected]
Chinedum @Szilard76829614
134 Followers 2K Following Autodidakt, 🐧🦀.glsl Everyone has their own problem(EHTOP)
@[email protected]... @bstamour1
260 Followers 388 Following Canadian software engineer. ISO C++ committee member. Installs Slackware Linux on all things. He/Him
Adam Riley @cppRiley
470 Followers 277 Following C++ Engineer in Cambridge, UK. Trying to never have to take any hard shots.
C++ Conferences @CppConferences
664 Followers 17 Following Twitter account for announcements, deadlines, etc about C++ conferences. Maintained by @DVMirchev
Artisanal C++ Paper T... @cpp_author
120 Followers 55 Following I love writing C++ standards papers. Tweeting title ideas. Testimonial: "👌" - @jfbastienMartin Moene @MartinMoene
820 Followers 1K Following C++ programmer at Universiteit Leiden, member & former webeditor of https://t.co/wYFX1sVQeZ.
luna was here @lunasorcery
14K Followers 957 Following • she/her • queer poly disaster • recovering former gamedev • private: @moon_dot_exe • banner: @kiingkiismet •
Taylor R Price @TRPriceSoftware
282 Followers 743 Following #BlackLivesMatter Software Engineer (C, C++, C#, and more), Consultant, Minecraft hosting provider. https://t.co/tk7txOzL7p
🇺🇦 Björn @bjor... @bjorn_fahller
3K Followers 315 Following This account is hibernating. If you want actual signs of life, reach out on @[email protected] and @rollbear.bsky.social
VMware @VMware
312K Followers 741 Following VMware by Broadcom delivers software that modernizes, optimizes and protects the world’s most complex organizations.
Arne Mertz 🏳️... @arne_mertz
3K Followers 1K Following #cpp and #CleanCode trainer, mentor, & occasional speaker (only with CoC). Work at @zuehlke_group #Hamburg he/him - @[email protected]


























