Understanding nullptr in Modern C++
The Problem with NULL
In C and C++, the NULL macro has been the traditional way to represent a null pointer. However, its definition differs between the two languages, leading to potential ambgiuities, especially in C++.
In C, NULL is typically defined as (void *) 0, a pointer to memory address zero. The C language allows implicit conversion fr ...
Posted on Thu, 11 Jun 2026 17:51:26 +0000 by sandeep251088
Disabling Functions in C++11 with the delete Specifier
Preventing Inheritance of Base Class Methods
In C++11, the = delete specifier provides a clean way to disable specific functions. This is particularly useful when you want to prevent a derived class from using certain member functions inherited from a base class.
Conisder a simple arithmetic class:
#include <iostream>
class BaseCalculato ...
Posted on Sat, 06 Jun 2026 17:58:11 +0000 by sbcwebs
Core C++ Knowledge Summary: Syntax, Memory, and Modern Features
Introduction
This document summarizes essential C++ concepts including syntax, memory management, and object-oriented programming.
1. C++ Fundamentals
1.1 Pointers and References
Differences Between Pointers and References
A pointer stores the address of an object. Its itself a variable (a named object) and has its own address, allowing pointer ...
Posted on Tue, 26 May 2026 18:46:23 +0000 by melittle
Modern C++ Core Features and Standard Library Enhancements
Standardization and Historical Context
The C++11 standard, ratified in 2011, marked a significant evolution from C++98/03. It introduced approximate 140 new features alongside numerous defect resolutions, transforming the language to better support modern system and library development with enhanced safety, efficiency, and programmer productivi ...
Posted on Tue, 26 May 2026 17:08:55 +0000 by Tonka1979
Understanding Rvalue References, Move Semantics, and Perfect Forwarding in Modern C++
Understanding Rvalue References, Move Semantics, and Perfect Forwarding in Modern C++
Distinguishing Value Categories
In C++11 and later, expressions are categorized into lvalues, prvalues, and xvalues. The latter two (xvalues and prvalues) are collectively known as rvalues. The primary practical distinction lies in whether the address of the e ...
Posted on Sat, 23 May 2026 20:12:00 +0000 by johnpaine
Modern C++ Features: A Comprehensive Guide
Introduction to Modern C++ (C++11/14/17/20)
This guide documents key features from the Modern C++ Tutorial: Quick Start with C++11/14/17/20.
Chapter 2: Core Language Enhancements
Compile-time Constants with constexpr
The constexpr keyword allows expressions to be evaluated at compile time, enabling optimizations.
constexpr int fibonacci_sequenc ...
Posted on Mon, 18 May 2026 16:40:13 +0000 by keyurshah
Key New Features in C++11
1. long long Integer Type
The long long type is an extended 64-bit integer type (8 bytes) with a signed range of -2^63 to 2^63 - 1.
To explicitly denote a value as a signed long long, append the suffix LL or II (e.g., 10LL represents the signed 64-bit integer 10). For unsigned long long values, use the suffix ULL or UII (e.g., 10ULL for the uns ...
Posted on Thu, 14 May 2026 21:42:19 +0000 by VirtualOdin
Inside UVW’s Event Emitter: Design Decisions and C++11 Tricks
The header uvw/emitter.hpp is the beating heart of the UVW library: every resource inherits from the Emitter template to gain an event-driven interface. This article walks through the interesting language features and design choices that make the class tick.
Type-safe event IDs without an enum
Lines 161–185 contain a small but powerful metap ...
Posted on Wed, 13 May 2026 05:15:32 +0000 by BinaryBird
Understanding C++ decltype and decltype(auto) Type Deduction
Core Mechanisms and Syntax Differences
C++11 introduced decltype as a compile-time type inquiry operator. While it shares conceptual ground with auto, their syntactic evaluation and deduction strategies diverge significantly. The auto keyword deduces a variable's type from an initializer expression, whereas decltype inspects an arbitrary expres ...
Posted on Sun, 10 May 2026 13:57:14 +0000 by pnj
Mastering Multithreading in C++11 and Beyond
C++11 introduced standardized support for multithreading, marking a significant shift in how concurrent programming is approached. Prior to this, develoeprs relied on platform-specific APIs, leading to non-portable code. The standard library now provides a consistent interface across different operating systems.
Each application begins with one ...
Posted on Fri, 08 May 2026 08:00:12 +0000 by barrow