By writing a constructor template you can cover several alternatives of the constructors. But there is also a way to call copy constructor or move constructor when you forwarding an object. In flowing code, we provided a Has-A type class to understand what type of constructor called. In the Has-A… Continue Reading Perfect Forwarding with Template
You can pass size of an array by only using a template parameter. Here is an example code of it
Here you are a short review code for templates Explicit Initialization forces compiler to create a version of code. Explicit Specialization is the way for creating an alternative implementation of a template method.
You cant throw an exception from a deconstruction method of a class because all destroy methods are noexcept(true).
virtual keyword on multiple base class creates one and only copy
Virtual is a keyword to declare that the method must be override If all method is virtual and equals 0, the class runs as an interface. Override keywords shows that the virtual method has been overridden. The shared pointer is the smart pointer way to declare a variable as a… Continue Reading All Virtual Methods Are Abstract in CPP
using keyword is the new way to implement a constructor to the child class.
If you set a list to an abject (or on auto keyword). CPP compiler assumes that the type of variable is initializer_list
Constexpr is a new keyword for a C++ developer. Normally Const returns constant but in runtime. Constexpr generally is used in front of a function. The function should be able to calculate in compile time. These functions must return void or a primitive or primitive reference.
Here is the short note Enum class a new type, It is, of course, an enum bat using namespace. Type is the variable is char in here and the value of a type declared as “a” in here.