Skip to content

Instantly share code, notes, and snippets.

View grawlinson's full-sized avatar
🦄
self.Drink(☕️)

George Rawlinson grawlinson

🦄
self.Drink(☕️)
View GitHub Profile
@grawlinson
grawlinson / pointers.md
Created September 20, 2024 00:59 — forked from Eisenwave/pointers.md
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 tutorial on pointers make gross simplifications, or 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.