C++ Core Guidelines: Constructors
The lifecycle of each object starts with its creation; therefore, this post will be about the thirteen most fundamental rules for objects: constructor rules.
This author has not written his bio yet.
But we are proud to say that Rainer Grimm contributed 689 entries already.
The lifecycle of each object starts with its creation; therefore, this post will be about the thirteen most fundamental rules for objects: constructor rules.
I have prepared the pdf bundle. To get it is quite simple.
Does my class need a destructor? I often heard this question. Most of the time the answer is no and you are okay with the rule of zero. Sometimes the answer is yes and we are back to the rule of five. To be more precise. The guidelines provide eight rules for destructors.
Concurrency with Modern C++ is a journey through current and upcoming concurrency in C++. C++11 and C++14 have the basic building blocks for creating concurrent or parallel programs. With C++17 we got the parallel algorithms of the Standard Template Library (STL). That means, most of the algorithms of the STL can be executed sequential, parallel, […]
This post is about the rule of zero, five, or maybe six. I will also show the difference between copy and reference semantics and a quite similar topic: deep versus shallow copy.
A class is a user-defined type where the programmer can specify the representation, the operations, and the interface. The C++ core guidelines have a lot of rules for user-defined types.
Now, it’s time to choose the next pdf bundle? You will get all posts, all source files, and a cmake file to the chosen topic.
Today, I conclude my treatise about the rules for functions in the C++ core guidelines. The last post was about the syntax of function parameters and return values. This post, with its roughly 15 rules, is about their semantics.
You have many choices to pass function parameters. You can pass by value or by reference. A reference can be const or non-const. You can even move or forward your parameters. Your decision should depend on if it is an in, and out, an in-out, a consume, or a forward function parameter. Curious? Read the […]
Concurrency with Modern C++ is a journey through current and upcoming concurrency in C++. This the last early version of my book. Only a small chapter including the best practices is missing.