decltype in C++: Understand the details

The keyword decltype in c++, returns the data type of an expression or variable. This keyword…

Copy Constructor and Move Constructor: Test with vector

Copy constructor and move constructor are different. The Copy constructor creates a fresh copy of resources…

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…

Understanding exception specification for functions

The exception specification is part of function signature and it tells which type of exceptions the…

What is c++ template meta programming (TMP)

using recursive template instantiations. To terminate the recursion, a c++ template specialization is needed as shown…

Calling member functions in base template class

When the base is template class, then compiler cannot simply call base class members in derived…

What are dependent scope type in templates?

Dependent type are types that depends on the template parameter. These dependent types are access via…