CRTP is a technique of achieving static polymorphism. And this technique is also called F-bound polymorphism…
Month: January 2021
C++ vector : emplace_back vs push_back
C++ vector has these two very special functions. vector push_back function and vector emplace_back function are…
Copy Constructor and Move Constructor: Test with vector
Copy constructor and move constructor are different. The Copy constructor creates a fresh copy of resources…
Recommendation for variable declaration in C++
In C++, the objects may need extra information to be initialized properly. The variable declaration need…
Rule of Three
Rule of three corresponds to automatic generation of 3 special member functions – constructor, destructor and…
How to avoid compiler generated constructor and destructor
To avoid compiler generated constructor and other special functions, a class may declare such functions as…
How to delete a function in C++11
This article shall explain different scenarios about how to delete a function in C++11. Also, how…
What is move constructor and why it take r-value?
Since, C++11, apart from existing compiler generated functions 2 more special functions are generated , these…
What is C++ reference collapsing, how it works?
With these c++ reference combinations, the compiler follows certain rules to collapse references to references and…
Benefit of using override keyword?
To override a virtual function, the functions in derived class must have exactly same signatures as…
How pointer to member functions in C++ is different ?
The pointer to member functions in C++ is a special concept. This is different from ordinary…
Understanding exception specification for functions
The exception specification is part of function signature and it tells which type of exceptions the…