classes

C++ Core Guidelines: Rules for Copy and Move

The rules for copy and move are quite obvious. But before I describe them I have to write about the two remaining rules for constructors. They are about delegating and inheriting constructors.

Read more
Tags: classes
Comments 2Views: 28063

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.

Read more
Tags: classes
Comments 3Views: 38378

C++ Core Guidelines: Destructor Rules

Does my class need a destructor? I often heard this question. Most of the times the answer is no and you are fine 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.

Read more
Tags: classes
Add CommentViews: 32273

C++ Core Guidelines: The Rule of Zero, Five, or Six

This post is about the rule of zero, five, or maybe six. I will also show the difference between copy and reference semantic and a quite similar topic: deep versus shallow copy.

Read more
Tags: classes
Comments 1Views: 78245

C++ Core Guidelines: Class Rules

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.

Read more
Tags: classes
Comments 3Views: 19662

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 1866

All 1953027

Currently are 173 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments