Skip to content

Instantly share code, notes, and snippets.

@sighingnow
sighingnow / cpp-tricks.md
Last active March 1, 2025 16:38
C++ Tricks.

Tricks in Modern C++

is_specialization_of

Whether the type is a specialization of template T.

template  class T, typename U>
@Eisenwave
Eisenwave / pointers.md
Last active April 5, 2025 16:52
How pointers in C++ actually work

How pointers in C++ actually work

Abstract: This document teaches you from the very basics to advanced features such as std::launder how pointers in C++ work. It is aimed at developers of any skill level. However, it links to the C++ standard so that advanced readers can verify the information and investigate further.

Motivation: Most tutorials on pointers are aimed at beginners, and present a simplified model. Some tutorials perpetuate an explanation of pointers that is solely based on their implementation (pointer = memory address). This tutorial aims to provide a comprehensive explanation of pointers that is in line with how they actually work from a language perspective.