std::any is a vocabulary type that characterizes a type-discriminating container of any single value. It can replace the unsafe void* patterns in many situations.
std::list splice can transfer a node to a different position within the same list without copying or moving the element. We use this feature to implement a Least Recently Used (LRU) cache.
C++17 standard introduced the node extraction, making it possible to unlink an associative container's node, update its contents, and reinsert it in the same or another compatible container.
Modern-C++ constructs — unique_ptr, shared_ptr, weak_ptr, and reference_wrapper — express relationships among classes more intelligibly than raw pointers.
"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.