std::reference_wrapper<T> is a copyable and assignable object that imitates a reference (T&). It gives the non-nullable guarantee of a reference and the pointer-like flexibility to rebind to another object.
"C++: Know More" is a series of C++ question blogs ranging from basic to advance level. Whether you are a student learning C++, or a professional who wants to hone their skill, you would always find something useful here.
This series is about the C++11 standard of C++. We cover C++11 topics such as lambda expressions, rvalue references and move constructors, automatic type inference - auto, nullptr, strongly typed enums, unrestricted unions, variadic templates, smart pointers, explicit overrides of virtual functions, defaulted and deleted special member functions, initializer lists, and more.
Java, like C++ and C#, is a statically typed language. Statically typed languages have various data types (e.g. int, float, and boolean) to support strict type checking at compile time, called type safety. Java has 8 primitive data types namely byte, short, int, long, float, double, boolean, and char. In addition to 8 primitive types the language has built-in support for character strings though type String. In this series we talk about the primitive types, String and operations on those. We are also going to have some questions on arrays of these types.
Operator overloading in C++ is one of the key features at the core of the programing language. It enables programmers to add same syntactic support to user-defined types as of primitive types. This series has questions on common operator overloading concepts and patterns like functor, smart-pointer, deep-copy, move semantics, user-defined types as keys in associative containers, and more.