Ep 506: Zero Cost Function Binding
This episode extends the previous episode's NTTP bind concept by implementing a custom bind_front that accepts multiple compile-time parameters, not...
Ep 505: C++26's CNTTP bind Functions
This episode explores C++26's enhancement to std::bind_front and std::bind_back that allows passing functions as non-type template parameters (NTTP)...
Ep 504: Practical Reflection in C++26
This episode showcases the most practical application of C++26 reflection: automatic binding of C++ functions to scripting interfaces. Jason...
Ep 503: The Amazing Power of C++26's Template For Statements (Ep 503)
This episode explores C++26's expansion statements (template for), a powerful new feature that enables compile-time iteration over heterogeneous...
Ep 502: Simple Reflection For C++20
This episode demonstrates a basic reflection technique achievable in C++20 using structured bindings and template metaprogramming. Jason creates a...
Ep 501: Does C++26 Solve the constexpr Problem?
This episode examines C++26's define_static_string and define_static_array features (from paper P3491R3) that finally solve a long-standing problem:...
Ep 500: The Show's Half Over!
In this milestone 500th episode, Jason reflects on C++ Weekly's journey since March 7, 2016, having never missed a single week. He announces plans to...
Ep 499: GCC's Stack Usage Analysis (and Warnings!)
This episode explores GCC's built-in stack usage analysis tools, which are invaluable for embedded development and resource-constrained environments....
Ep 498: Lifetimes of Local Variables
Jason explains the lifetime rules for automatic (lexically scoped) variables in C++, demonstrating that lifetime begins at declaration and ends at...
Ep 497: How to Add Static Analysis to Legacy C++
Jason provides practical guidance for incrementally adding compiler warnings and static analysis to legacy codebases without being overwhelmed. He...
Ep 496: Stack vs Heap
Jason explains the fundamental differences between stack and heap memory allocation, noting that while the C++ standard doesn't explicitly define...
Ep 495: Custom Formatters for std::Format
Jason provides a quick introduction to creating custom formatters for std::format and std::print in C++20/23. He demonstrates the simplest possible...
Ep 494: Tool Spotlight: Modern Safe scanf: scnlib
Jason showcases scnlib, a modern and safe replacement for scanf that provides format-based parsing similar to how lib{fmt} provides formatting. The...
Ep 493: C++ GUI Quick Start with FLTK
Jason demonstrates how to quickly get started with GUI development in C++ using the FLTK (Fast Light Toolkit) library and his cmake_template project....
Ep 492: initializer_list Constructors
Jason explains the subtle but important differences between braced and parenthesized initialization when initializer_list constructors are present....
Ep 491: Extract, Merge, Insert: C++17 Node Handles
Jason demonstrates C++17's node handle feature that allows efficient transfer of elements between associative containers (map, set, and their...
Ep 490: std::ignore vs _ vs [[maybe_unused]]
Jason compares three approaches for explicitly ignoring return values from [[nodiscard]] functions: std::ignore (C++11), [[maybe_unused]] attribute...
Ep 489: C++11's User Defined Literals
Jason explores C++11's user-defined literals feature, explaining their constraints and best practices. User-defined literals must accept specific...
Ep 488: 35 Years of Sad Game Dev Attempts
Jason takes viewers on a personal journey through 35 years of game development projects, from a 1990 animal name game in Commodore 64 BASIC to his...
Ep 487: AI: Not Just Autocomplete
This episode is an unscripted demonstration of using the Anthropic Claude AI agent to refactor a C++ codebase from using exceptions to std::expected....
Ep 486: Captureless Lambdas with Captures
This episode explores the fascinating behavior where lambdas can access constexpr local variables without capturing them, effectively creating...
Ep 485: Variadic Structured Bindings in C++26
This episode introduces C++26's variadic structured bindings feature, which allows structured bindings to create parameter packs from destructurable...
Ep 484: Infinite Loops, UB, and C++26
This episode reveals a surprising aspect of C++ where infinite loops were undefined behavior before C++26, allowing compilers to make aggressive...
Ep 483: Stop Using rand, Start Using Random
This episode provides a practical introduction to the C++
Ep 482: Safely Wrapping C APIs
This episode demonstrates how to create type-safe, RAII-compliant wrappers around C library functions like fopen and fread. Jason shows that most...
Ep 481: What is Tail Call Elimination (Optimization)?
This episode explains tail call elimination, a compiler optimization where returning the result of a function call can be transformed into a jump...
Ep 480: cmath vs math.h vs abs vs std::abs, fight!
This episode reveals a subtle but important issue where calling unqualified abs() on floating-point values in C++ can silently truncate to integer...
Ep 479: final (and when to use it)
This episode explores C++'s 'final' keyword, which can be applied to classes to prevent inheritance or to virtual functions to prevent further...
Ep 478: Lambdas on the Heap (2)
This episode is a follow-up to a previous exploration of lambdas on the heap, correcting a mistake from the earlier video. Jason demonstrates how to...
Ep 477: What is Empty Base Optimization? (EBO)?
This episode introduces Empty Base Optimization (EBO), a compiler technique that optimizes memory layout when inheriting from empty classes. Jason...
Ep 476: C++23's Fold Algorithms
This episode introduces C++23's new fold algorithms: fold_left, fold_left_first, fold_right, fold_right_first, fold_left_with_iter, and...
Ep 475: Lambdas On The Heap?
This episode explores the concept of creating C++ lambdas on the heap rather than on the stack. Jason explains how lambdas are closure objects...
Ep 474: What Can LEA Do For You?
This episode demystifies the Load Effective Address (LEA) instruction commonly seen in Compiler Explorer outputs. Jason demonstrates how compilers...
Ep 473: continue and break Statements
This episode explains how continue and break statements work in C++ loops, including their behavior in range-based for loops. Jason demonstrates that...
Ep 472: C++23's static lambdas?!
This episode explores C++23's new feature that allows declaring static call operators for lambdas. Jason demonstrates how this feature can...
Ep 471: C++26's =delete With a Reason
This episode explores C++26's enhancement to the `=delete` functionality, which now allows adding a reason that appears in compiler error messages....
Ep 470: requires Clause vs requires Expression?
This episode clarifies the distinction between 'requires clauses' and 'requires expressions' in C++20. Jason explains that a requires clause expects...
Ep 469: How to Print in C++23
This episode presents a concise overview of the best approaches for printing output in C++23. Jason recommends using puts() for simple...
Ep 468: Use -fvisibility=hidden!
This episode explores the significant benefits of using the -fvisibility=hidden compiler flag when creating shared libraries. Jason demonstrates how...
Ep 467: C++ Weekly Ep 467 - enum struct vs enum class
This episode discusses the syntactic equivalence between 'enum class' and 'enum struct' in C++, both of which create scoped enumerations with...
Ep 466: C++ Weekly Ep 466 - invoke_r Should Not Exist
This episode critiques the C++23 std::invoke_r function, highlighting two major issues with its design. Jason demonstrates that invoke_r only works...
Ep 465: C++ Weekly Ep 465 - C++26's std::span Over initializer_list
This episode discusses a new C++26 feature that allows constructing a std::span from an initializer list, addressing a common pain point in C++...
Ep 464: Easily Printing std::variant
This episode demonstrates a simple yet powerful technique for printing std::variant values using generic lambdas and std::visit. Jason shows how to...
Ep 463: C++26's Safer Returns
This episode highlights a safety improvement in C++26 where returning a reference to a temporary value is now a hard compilation error, rather than...
Ep 462: C++23's Amazing New Range Formatters
This episode explores C++23's powerful new range formatting capabilities, which enable easy printing of various container types and nested data...
Ep 461: C++26's std::views::concat
This episode explores C++26's new std::views::concat feature, which allows multiple ranges to be treated as a single concatenated range. Jason...
Ep 460: Why is GCC Better Than Clang?
In this episode, Jason investigates performance differences between GCC and Clang compilers using his Game of Life simulation code. He shares data...
Ep 459: C++26's Saturating Math Operations
This episode introduces C++26's new saturating math operations, which prevent overflow by clamping results to the maximum or minimum representable...
Ep 458: array of bool? No! constexpr std::bitset!
This episode explores the advantages of std::bitset over alternatives like std::array
Ep 457: I Read C++ Magazines (So you don't have to!)
In this episode, Jason reviews two C++ beginner magazines purchased five years apart from different publishers but with remarkably similar content....
Ep 456: RVO + Trivial Types = Faster Code
This episode examines how Return Value Optimization (RVO) applies to trivial types like arrays, showing significant performance impacts. Jason...
Ep 455: Tool Spotlight: Mutation Testing with Mull
This episode introduces mutation testing with the Mull tool, which helps evaluate test suite quality by modifying source code to create 'mutants' and...
Ep 454: std::apply vs std::invoke (and how they work!)
This episode explains the differences between std::invoke and std::apply, two powerful standard library utilities for calling functions. Jason...
Ep 453: Valgrind + GDB Together!
This episode demonstrates how to use Valgrind and GDB together to debug memory issues in C++ programs. Jason shows how Valgrind can act as a remote...
Ep 452: The Confusing Way Moves Can Be Broken in C++
This episode explores a confusing aspect of C++ move semantics: how defining a custom destructor silently disables move operations without making...
Ep 451: Debunking bad_alloc Memory Errors (They're actually useful!)
This episode examines the claim that std::bad_alloc exceptions are obsolete due to modern operating systems' memory overcommitment. Through practical...
Ep 450: C++ is a Functional Programming Language
This episode responds to criticisms about functional programming features in C++, with Jason demonstrating that C++ has supported functional...
Ep 449: More constexpr Math!
This episode discusses the availability of constexpr math functions in C++. Jason explains how many standard
Ep 448: C++23's forward_like
This episode explores C++23's std::forward_like utility in conjunction with C++23's "deducing this" feature. Jason demonstrates how these features...
Ep 447: What Are Reference Qualified Members?
This episode explains reference-qualified member functions in C++, which allow different function implementations based on whether the object is an...
Ep 446: ImHex: An Awesome Hex Editor
This episode highlights ImHex, an open-source, cross-platform hex editor written in C++. Jason demonstrates the tool's extensive feature set,...
Ep 445: C++11's thread_local
This episode explores C++11's thread_local storage duration specifier, which creates variables that are global to individual threads. Jason...
Ep 444: GCC's Implicit constexpr
This episode explores GCC's compiler-specific -fimplicit-constexpr flag, which automatically makes inline functions constexpr if they satisfy the...
Ep 443: Stupid constexpr Tricks
This episode explores several surprising and lesser-known constexpr behaviors in C++. Jason demonstrates how const integral values initialized with...
Ep 442: Stop Using .h For C++ Header Files!
In this episode, Jason makes a case against using the .h extension for C++ header files, arguing that it creates confusion about whether a file is...
Ep 441: What is Multiple Dispatch (and how does it apply to C++?)
In this episode, Jason explores the concept of multiple dispatch (also known as multimethods), which allows function calls to be dynamically...
Ep 440: Revisiting Visitors for std::visit
In this episode, Jason revisits the implementation of visitors for std::visit when working with std::variant. He demonstrates three approaches: using...
Ep 439: mutable (And Why To Avoid It)
In this episode, Jason explores the mutable keyword in C++ and explains why it should generally be avoided. He demonstrates how mutable allows member...
Ep 438: C++23's ranged-for Fixes
In this episode, Jason explores a significant improvement in C++23 that fixes lifetime issues with range-based for loops. He demonstrates how C++20...
Ep 437: Pointers To Overloaded Functions
In this episode, Jason explores the challenges of obtaining and passing pointers to overloaded functions in C++. He demonstrates that when working...
Ep 436: Transforming Lambda Captures
In this episode, Jason explores a technique for transforming values as they are captured by lambdas using C++20's pack expansion in lambda...
Ep 435: Easy GPU Programming With AdaptiveCpp (68x Faster!)
In this episode, Jason explores AdaptiveCpp (formerly Open SYCL), a tool that enables C++ developers to easily offload parallel algorithms to GPUs...
Ep 434: GCC's Amazing NEW (2024) -Wnrvo
In this episode, Jason explores GCC's new -Wnrvo warning flag which detects when Named Return Value Optimization (NRVO) cannot be applied in...
Ep 433: C++'s First New Floating Point Types in 40 Years!
In this episode, Jason explores the new floating point types introduced in C++23, which are the first new floating point types added to the C++...
Ep 432: Why constexpr Matters
This episode addresses common misconceptions about constexpr, explaining that its value extends beyond solving entire problems at compile time. Jason...
Ep 431: CTAD for NTTP
This episode explores the combination of Class Template Argument Deduction (CTAD) with Non-Type Template Parameters (NTTP) in C++. Jason explains how...
Ep 430: How Short String Optimizations Work
This episode explains the Small String Optimization (SSO) technique used in standard library classes like std::string, std::any, and std::function to...
Ep 429: C++26's Parameter Pack Indexing
This episode introduces parameter pack indexing, a new feature coming in C++26 that simplifies working with template parameter packs. Jason...
Ep 428: C++23's Coroutine Support: std::generator
This episode introduces std::generator, a key addition in C++23 that provides the first standard library support for coroutines. Jason demonstrates...
Ep 427: Simple Generators Without Coroutines
This episode demonstrates how to create Python-like generators in C++ without using coroutines or std::generate. Jason shows a clever technique using...
Ep 426: Lambdas As State Machines
This episode explores how mutable lambdas with captures can function as self-contained state machines. Jason demonstrates this concept first with a...
Ep 425: Using string_view, span, and Pointers Safely!
This episode addresses the potential dangers of using std::string_view, std::span, and other non-owning reference types in C++. Jason demonstrates...
Ep 424: .reset vs →reset()
This episode addresses a subtle but potentially serious API design issue with nested types that both provide similar methods. Jason demonstrates how...
Ep 423: Complete Guide to Attributes Through C++23
This episode provides a comprehensive overview of all C++ attributes from C++11 through C++23. Jason covers the functionality, purpose, and potential...
Ep 422: Moving from C++20 to C++23
In this episode, Jason continues his series on modernizing legacy code by upgrading his infix math expression evaluator to C++23. He focuses on...
Ep 421: You're Using optional, variant, pair, tuple, any, and expected Wrong!
This episode discusses a common performance issue with wrapper types like std::optional, std::variant, std::pair, std::tuple, std::any, and...
Ep 420: Moving From C++17 to C++20 (More constexpr!)
In this episode, Jason continues his series on modernizing code by migrating from C++17 to C++20. He focuses on C++20's enhanced constexpr...
Ep 419: The Important Parts of C++23
In this episode, Jason highlights what he considers the most important features of C++23. He showcases 13 key additions including std::print/println...
Ep 418: Moving From C++14 to C++17
This episode continues Jason's series on modernizing C++ code, focusing on migrating from C++14 to C++17. He demonstrates powerful C++17 features...
Ep 417: Turbocharge Your Build With Mold?
This episode explores the Mold linker, a high-performance alternative to traditional linkers for C++ projects. Jason shares his experiments with...
Ep 416: Moving From C++11 to C++14
In this episode, Jason Turner continues his series on C++ modernization by migrating code from C++11 to C++14. He demonstrates key C++14 improvements...
Ep 415: Moving From C++98 to C++11
In this episode, Jason Turner demonstrates the process of modernizing legacy C++98 code to C++11. He shows various C++11 features like enum class,...
Ep 414: C++26's Placeholder Variables With No Name
This episode explores C++26's new placeholder variable feature, which allows developers to use an underscore (_) as a variable name when the value is...
Ep 413: (2x Faster!) What are Unity Builds (And How They Help)
This episode explores Unity builds, a compilation technique where multiple C++ source files are concatenated into a single file before compilation....
Ep 412: Possible Uses of C++23's [[assume]] Attribute
This episode explores C++23's new [[assume]] attribute, which allows developers to give the compiler hints about guaranteed conditions in their code....
Ep 411: Intro to C++ Exceptions
This episode provides a fundamental introduction to C++ exceptions. Jason demonstrates basic exception mechanics including throwing and catching...
Ep 410: What Are Padding and Alignment? (And Why You Might Care)
This episode explains the critical concepts of alignment and padding in C++ data structures. Jason demonstrates how different data types require...
Ep 409: How To 2x or 3x Your Developer Salary in 2024 (Plus Some Interviewing Tips!)
In this career-focused episode, Jason shares proven strategies for significantly increasing your developer salary through community involvement and...
Ep 408: Implementing C++23's constexpr unique_ptr in C++20
This episode demonstrates how straightforward it is to implement a constexpr version of std::unique_ptr in C++20, despite it only being officially...
Ep 407: C++98 Code Restoration
In this extended episode, Jason demonstrates a comprehensive renovation of legacy C++98 code, transforming it into high-quality, maintainable...
Ep 406: Why Avoid Pointer Arithmetic?
This episode explains why pointer arithmetic should be avoided in modern C++ code. Jason demonstrates how easy it is to introduce undefined behavior...
Ep 405: Dogbolt: The Decompiler Explorer
This episode introduces Dogbolt, a free online service similar to Compiler Explorer (Godbolt) but for decompilation rather than compilation. Jason...
Ep 404: How (and Why) To Write Code That Avoids std::move
This episode explains why developers should prefer writing code that avoids explicit std::move calls. Using a simple example with a custom 'Lifetime'...
Ep 403: Easier Coroutines with CppCoro
This episode introduces CppCoro, a library that simplifies working with C++20 coroutines by providing essential utilities and abstractions that the...
Ep 402: Reviewing My 25 Year Old C++ Code (IT'S BAD!)
In this entertaining episode, Jason reviews his own C++ code from 1997-1998 university projects, critiquing it from a modern C++ perspective. He...
Ep 401: C++23's chunk view and stride view
This episode concludes Jason's mini-series on C++23's new ranges views, focusing on chunk_view and stride_view. The chunk_view divides a range into...
Ep 400: C++ is 40... Is C++ DYING?
In this milestone 400th episode, Jason addresses the popular question of whether C++ is dying. He presents evidence of C++'s continued relevance by...
Ep 399: C++23's slide_view vs adjacent_view #cplusplus23 #cpp23
This episode continues Jason's mini-series on C++23 ranges by comparing two easily confused views: adjacent_view and slide_view. While both create...
Ep 398: C++23's zip_view #cpp23 #cplusplus
This episode introduces C++23's new zip_view from the ranges library, the first in a mini-series covering new view types. Jason demonstrates how...
Ep 397: std::chrono Quickstart With C++20 Calendars! #cpp #cplusplus #cpp20 #calendar
This episode provides a quick introduction to the std::chrono library, highlighting its evolution from C++11 to C++20's calendar and formatting...
Ep 396: emplace vs emplace_hint! What's the difference? #cplusplus #cpp
This episode explores the various 'emplace' functions available in C++ standard containers and their purpose of constructing objects directly...
Ep 395: How Much is 100,000 Subscribers Worth? #1ksubscribers #channel #income
In this special milestone episode celebrating 100,000 subscribers, Jason provides a transparent look at the financial reality of running a...
Ep 394: C++11's Most Overlooked Feature: Delegating Constructors
This episode explores delegating constructors, a feature introduced in C++11 that allows one constructor to call another constructor of the same...
Ep 393: C++23's std::unreachable
This episode explores std::unreachable, a new feature in C++23 that explicitly invokes undefined behavior to optimize impossible code paths. Jason...
Ep 392: Google's Bloaty McBloatface
This episode introduces Bloaty McBloatface, Google's binary size profiler tool. Jason demonstrates how this utility helps developers understand what...
Ep 391: Finally! C++23's std::views::enumerate
This episode celebrates the long-awaited addition of std::views::enumerate to C++23, a feature that many other programming languages have had for...
Ep 390: constexpr + mutable ?!
This episode explores the seemingly contradictory combination of 'constexpr' and 'mutable' keywords in C++. Jason demonstrates that a lambda marked...
Ep 389: Avoiding Pointer Arithmetic
This episode discusses modern C++ alternatives to traditional pointer arithmetic when working with C-style interfaces like main's argc/argv...
Ep 388: My constexpr Revenge Against Lisp
This episode introduces cons_expr, Jason's compile-time friendly embedded scripting language for C++ inspired by Lisp/Scheme. Jason explains how this...
Ep 387: My Customized C++ Programming Keyboard!
In this episode, Jason demonstrates his customized Adafruit MacroPad configured specifically for C++ programming. He shows how he mapped frequently...
Ep 386: C++23's Lambda Attributes
This episode explores C++23's new feature allowing attributes to be applied to lambda expressions. Jason demonstrates how attributes like...
Ep 385: The Important Parts of C++20 In Less Than 8 Minutes!
This episode provides a concise overview of the most significant C++20 features, including designated initializers that allow specifying struct/class...
Ep 384: Lambda-Only Programming
This episode explores the unusual concept of using lambdas for everything in C++, presented as a fun thought experiment rather than a best practice....
Ep 383: C++ Cross Training
This episode discusses the importance of learning programming languages beyond C++ to become a better C++ developer, drawing an analogy with athletic...
Ep 382: The Static Initialization Order Fiasco and C++20's constinit
Jason explores the Static Initialization Order Fiasco in C++ (where interdependent global objects may be initialized in an unpredictable order) and...
Ep 381: C++23's basic_string::resize_and_overwrite
Jason explores C++23's new basic_string::resize_and_overwrite function, which improves performance when initializing strings that will be immediately...
Ep 380: What Are std::ref and std::cref and When Should You Use Them?
In this episode, Jason explores std::ref and std::cref, useful utilities for creating reference wrappers. He demonstrates three key use cases: with...
Ep 379: clang-tidy's "Easily Swappable Parameters" Warning - And How to Fix It!
Jason explores clang-tidy's "bugprone-easily-swappable-parameters" warning, which flags when functions have multiple adjacent parameters of the same...
Ep 378: Should You Ever std::move An std::array?
In this episode, Jason discusses whether it's beneficial to use std::move with std::array. While an array itself cannot be moved (as it's a...
Ep 377: Looking Forward to C++26: What C++ Needs Next
In this episode, Jason shares his perspective on the top features C++ needs in its future evolution. He prioritizes five key improvements: completing...
Ep 376: Ultimate CMake C++ Starter Template (2023 Updates)
Jason introduces his updated CMake template for C++ projects in 2023, consolidating his previous templates into a single, streamlined repository...
Ep 375: Using IPO and LTO to Catch UB, ODR, and ABI Issues
Jason demonstrates how Interprocedural Optimization (IPO) and Link Time Optimization (LTO) can detect One Definition Rule (ODR) violations that...
Ep 374: C++23's out_ptr and inout_ptr
This episode explores C++23's new std::out_ptr and std::inout_ptr utilities, designed to simplify interaction between C++ smart pointers and C APIs...
Ep 373: Design Patterns in "Modern" C++ (2023)
In this episode, Jason discusses design patterns in modern C++, focusing particularly on the Observer pattern (similar to signals and slots in Qt)....
Ep 372: CPM For Trivially Easy Dependency Management With CMake?
This episode explores CPM (CMake Package Manager), a dependency management solution that integrates seamlessly with CMake. Jason demonstrates his...
Ep 371: Best Practices for Using AI Code Generators (ChatGPT and GitHub Copilot)
This episode outlines best practices for effectively using AI code generation tools like ChatGPT and GitHub Copilot. Jason emphasizes that users must...
Ep 370: Do Constructors Exist?
This episode challenges the conceptual understanding of C++ constructors by arguing they aren't actually functions that can be called directly, but...
Ep 369: llvm-mos: Bringing C++23 To Your Favorite 80's Computers
This episode explores llvm-mos, a modern compiler toolchain that enables C++23 programming for 6502-based 8-bit computers like the Commodore 64,...
Ep 368: The Power of template-template Parameters: A Basic Guide
This episode explores template-template parameters in C++, which allow functions or classes to accept template types (like std::vector) rather than...
Ep 367: Forgotten C++: std::valarray
This episode explores std::valarray, a largely forgotten part of the C++ Standard Library that was introduced in C++98 and has received minimal...
Ep 366: C++ vs Compiled Python (Codon)
This episode compares the performance of C++, regular Python, PyPy JIT, and Codon (a Python-to-native compiler) implementations of Conway's Game of...
Ep 365: Modulo (%): More Complicated Than You Think
This episode explores the surprising complexity of the modulo operation in various programming languages. Jason demonstrates that different languages...
Ep 364: Python-Inspired Function Cache for C++
This episode explores implementing a Python-inspired function memoization cache in C++. Jason builds a generic caching wrapper that can store the...
Ep 363: A (Complete?) Guide To C++ Unions
This episode provides a comprehensive guide to C++ unions, explaining their core properties and evolution since C++98. Jason demonstrates how unions...
Ep 362: C++ vs Python vs Python (jit) vs Python With C++!
Jason compares performance between C++, standard Python (CPython), JIT-compiled Python (PyPy), and Python with embedded C++ (via cppyy) using...
Ep 361: Is A Better `main` Possible?
Jason explores ways to create a more modern, type-safe version of the main() function in C++. He demonstrates a pattern that forward-declares a...
Ep 360: Scripting C++ Inside Python With cppyy
Jason explores cppyy, a Python library that enables C++ code to be compiled and executed within Python scripts. He demonstrates how cppyy dynamically...
Ep 359: std::array's Implementation Secret (That You Can't Use!)
Jason explores the internal implementation of std::array by creating a simplified version from scratch. He reveals that std::array is essentially a...
Ep 358: C23's #embed and C++23's #warning
Jason explores two new preprocessor directives coming in C23 and C++23. First, he demonstrates the #embed directive, developed by JeanHeyd Meneide...
Ep 357: typename VS class In Templates
Jason explores the difference between using 'typename' and 'class' keywords in C++ templates. He explains that for most template parameters, these...
Ep 356: The Python Enabled Calculators of 2022
Jason explores Python-enabled graphing calculators as accessible tools for learning programming without needing internet connectivity or complex...
Ep 355: 3 Steps For Safer C++
Jason presents a simplified three-step approach to safer C++ development. He starts with a prerequisite (step 0) of having a continuous...
Ep 354: Can AI And ChatGPT Replace C++ Programmers?
Jason explores the capabilities of ChatGPT as a tool for programming in C++, demonstrating its ability to convert code between different language...
Ep 353: Implicit Conversions Are Evil
Jason argues that implicit conversions are a dangerous C++ feature that should be removed from the language. Through multiple code examples, he...
Ep 352: Not Doing This Should Be Illegal! (Always Fuzz Your C++!)
In this episode, Jason advocates for the essential practice of fuzz testing in C++ development. He demonstrates how fuzz testing — a technique that...
Ep 351: Your 5 Step Plan For Deeper C++ Knowledge
This episode provides a structured approach to deepen C++ knowledge through hands-on experimentation. Jason outlines a five-step plan: 1) Create an...
Ep 350: The Right Way to Write C++ Code in 2022
This episode outlines a comprehensive approach to modern C++ development, emphasizing that we're in a 'golden age' of C++ tooling. Jason covers...
Ep 349: C++23's move_only_function
This episode introduces C++23's std::move_only_function, a new feature designed for working with non-copyable callables. Jason demonstrates how...
Ep 348: A Modern C++ Quick Start Tutorial - 90 Topics in 20 Minutes
This comprehensive episode serves as a rapid-fire introduction to modern C++ by demonstrating how understanding lambdas provides insight into nearly...
Ep 347: This PlayStation Jailbreak NEVER SHOULD HAVE HAPPENED
This episode examines a serious security vulnerability in the PlayStation 5 that led to a jailbreak exploit. Jason explains how the vulnerability...
Ep 346: C++23's bind_back
This episode explores C++23's bind_back function, a utility that binds arguments to the end of a callable object's parameter list. Jason demonstrates...
Ep 345: No Networking in C++20 or C++23! Now What?
This episode addresses the absence of networking in the C++20 and C++23 standards, providing a comprehensive overview of available third-party...
Ep 344: decltype(auto): An Overview of How, Why and Where
This episode explains decltype(auto), a powerful C++11 feature that deduces the exact type of an expression, including reference and const...
Ep 343: Digging Into Type Erasure
This episode explores different approaches to type erasure in C++, showcasing techniques to hide exact types at runtime. Jason demonstrates three...
Ep 342: C++20's Ranges: A Quick Start
This episode provides a quick introduction to C++20's Ranges library. Jason presents four key benefits: simplified algorithm calls without manually...
Ep 341: std format vs lib {fmt}
This episode compares the C++20 standard format library with the standalone {fmt} library it's based on. Jason highlights key differences including...
Ep 340: Finally! A Simple String Split in C++!
This episode demonstrates how C++20 Ranges provide an elegant solution to the long-standing challenge of string splitting in C++. Jason shows how...
Ep 339: `static constexpr` vs `inline constexpr`
This episode provides a crucial follow-up to Episode 312, clarifying when to use 'static constexpr' versus 'inline constexpr'. Jason demonstrates...
Ep 338: Analyzing and Improving Build Times
This episode demonstrates how to analyze and optimize C++ build times using Clang's time-trace feature. Jason examines his ChaiScript project,...
Ep 337: C23 Features That Affect C++ Programmers
This episode explores key features coming in C23 that impact C++ programmers, particularly focusing on interoperability between the languages. Jason...
Ep 336: C++23's Awesome std::stacktrace Library
This episode explores the new std::stacktrace library coming in C++23, which provides runtime access to the current call stack. Jason demonstrates...
Ep 335: Projects That Need Your Help! - Channel News and Updates
In this channel news update, Jason discusses his various ongoing projects and ways viewers can get involved. He highlights his books (including his...
Ep 334: How to Put a Lambda in a Container
This episode explores different approaches to storing lambdas in containers in C++. Jason demonstrates three methods: using std::function (with...
Ep 333: A Simplified std::function Implementation
This episode demonstrates how to create a simplified implementation of std::function in C++20. Jason builds a type-erased function wrapper...
Ep 332: C++ Lambda vs std::function vs Function Pointer
This episode clarifies the key differences between lambdas, std::function, and function pointers in C++. Jason demonstrates that lambdas are language...
Ep 331: This Game Teaches C++!
In this episode, Jason introduces a new educational project he's been developing: a game designed to teach C++ programming. The project combines...
Ep 330: Faster Builds with `extern template` (And How It Relates to LTO)
This episode explores the 'extern template' feature added in C++11 and how it can significantly reduce compilation times. Jason demonstrates how...
Ep 329: How LTO Easily Makes Your Program Faster
This episode examines Link Time Optimization (LTO), also known as Inter-Procedural Optimization (IPO), and its significant performance benefits....
Ep 328: Recursive Lambdas in C++23
This episode demonstrates how C++23's 'deducing this' feature enables a clean implementation of recursive lambdas, a capability that was awkward to...
Ep 327: C++23's Multidimensional Subscript Operator Support
This episode explores C++23's new multidimensional subscript operator support, which allows for a more intuitive syntax when working with matrix-like...
Ep 326: C++23's Deducing `this`
This episode explores C++23's 'deducing this' feature, which solves the common problem of duplicating code when implementing both const and non-const...
Ep 325: Why vector of bool is Weird
This episode explores why std::vector
Ep 324: C++20's Feature Test Macros
This episode explores C++20's standardized feature test macros, which provide a compile-time way to check if specific C++ features are supported by...
Ep 323: C++23's auto{} and auto()
This episode introduces a seemingly small but important new feature in C++23: the auto{} and auto() syntax for creating explicit copies of objects....
Ep 322: Top 4 Places To Never Use `const`
This episode explores four scenarios where using 'const' can have unexpected negative performance implications in C++. Jason demonstrates how 'const'...
Ep 321: April 2022 Best Practices Game Jam Results
Jason reviews the results of his first C++ Best Practices Game Jam, where participants created console games following the theme "round" using the...
Ep 320: Using `inline namespace` To Save Your ABI
Jason explores how to use inline namespaces to handle ABI compatibility in C++ libraries. Introduced in C++11, inline namespaces allow library...
Ep 319: A JSON To C++ Converter
Jason introduces his json2cpp tool that converts JSON data into compiled C++ code with zero runtime overhead. Unlike constexpr JSON parsing, this...
Ep 318: My Meetup Got Nerd Sniped! A C++ Curry Function
Jason shares how his C++ meetup group tackled the challenge of creating a currying function in C++. Starting with a basic implementation that could...
Ep 317: Do You Really Understand Member Functions?
Jason examines how member functions are internally implemented by C++ compilers. Using assembly code analysis, he reveals that member functions...
Ep 316: What Are `const` Member Functions?
This episode provides a fundamental introduction to const member functions in C++. Jason explains how const member functions indicate that a method...
Ep 315: constexpr vs static constexpr
Jason investigates the performance differences between regular constexpr and static constexpr variables through detailed benchmarks across GCC,...
Ep 314: Every Possible Way To Force The Compiler To Do Work At Compile-Time in C++
Jason comprehensively explores all possible techniques to force C++ compilers to perform calculations at compile time. He explains that simply...
Ep 313: The `constexpr` Problem That Took Me 5 Years To Fix!
Jason explores a five-year journey to solve a challenging constexpr problem: how to efficiently transfer compile-time string data to runtime without...
Ep 312: Stop Using `constexpr` (And Use This Instead!)
This episode clarifies common misconceptions about constexpr variables in C++. Jason demonstrates that constexpr variables alone don't guarantee...
Ep 311: ++i vs i++
This episode examines the differences between pre-increment (++i) and post-increment (i++) operators in C++. Jason explains that these operators have...
Ep 310: Your Small Integer Operations Are Broken!
This episode highlights a significant but often overlooked issue with small integer operations in C++. Jason demonstrates how operations with...
Ep 309: Are Code Comments a Code Smell?
In this episode, Jason explores whether code comments should be considered a 'code smell' - a characteristic that might indicate deeper problems in...
Ep 308: 'if consteval' - There's More To This Story
This episode builds on the previous discussion of C++23's 'if consteval' feature (episode 304), correcting and expanding on its primary motivation....
Ep 307: Making C++ Fun and Accessible
In this episode, Jason discusses his initiative to make C++ more fun and accessible, particularly for beginners and non-programmers. He introduces...
Ep 306: What Are Local Functions, and Do They Exist in C++?
This episode explores the concept of local functions in C++ and explains why true local function definitions are not possible in the language. Jason...
Ep 305: Stop Using `using namespace`
This episode makes a compelling case against the use of 'using namespace' directives in C++ code. Jason explains how these directives can create...
Ep 304: C++23's 'if consteval'
This episode explores C++23's new 'if consteval' feature, comparing it to C++17's 'if constexpr' and C++20's 'std::is_constant_evaluated()'. Jason...
Ep 303: C++ Homework: Lambda All The Things
This episode presents a programming exercise that challenges viewers to replace traditional functions with lambdas in their C++ code. Jason explains...
Ep 302: It's Not Complicated, It's std::complex
This episode explores std::complex, a template class in the C++ Standard Library for representing complex numbers with real and imaginary parts....
Ep 301: C++ Homework: `constexpr` All The Things
Jason presents the third in his series of C++ homework assignments, challenging viewers to maximize the use of constexpr in their code. Using the...
Ep 299: C++ Homework: `const` All The Things
Jason presents the second in his series of C++ homework assignments, challenging viewers to take an existing C++ project and make everything const...
Ep 298: Detecting ABI Changes With abidiff
Jason explores the libabigail toolset, focusing on the abidiff utility which helps detect Application Binary Interface (ABI) changes between...
Ep 297: C++ Homework: `auto` All The Things
Jason challenges viewers with a coding exercise: take an existing C++ program and convert as many variable, parameter, and return types as possible...
Ep 296: Constraining `auto` in C++20
Jason addresses common criticisms of the `auto` keyword in C++ by demonstrating how C++20 concepts can be used to constrain automatic type deduction....
Ep 295: API Design: Principle of Least Surprise
Jason responds to feedback on his implementation of the xoroshiro128 random number generator from Episode 285, focusing on API design considerations...
Ep 294: Hello Commander X16
Jason explores programming for the Commander X16, a new retro computer project led by the 8-Bit Guy (David Murray). Using his C++ for 6502 toolchain,...
Ep 293: RPG in C++20 Project: Major Updates!
In this episode, Jason provides an update on his C++20 RPG game project, which is now running on a Commodore 64 emulator using 6502 assembly. He...
Ep 292: Safely Using `goto` In C++
This episode examines the safety aspects of using goto statements in C++. Jason explains that while goto is generally discouraged, the C++ compiler...
Ep 291: Start Using `as_const`
This episode explains how to safely treat non-const objects as const when you need to call const-qualified member functions. Jason addresses feedback...
Ep 290: C++14's Digit Separators and Binary Literals
This episode explores two lesser-known C++14 features that enhance code readability. Jason demonstrates binary literals, which allow directly...
Ep 289: Returning From The `void`
This episode examines a lesser-known C++ feature: the ability to return a void expression from a void function. Jason explores how this capability,...
Ep 288: Quick Perf Tip: Prefer `auto`
This episode demonstrates the performance benefits of using auto over explicit type declarations in C++. Jason explains that auto prevents unintended...
Ep 287: Understanding `auto`
This episode clarifies common misconceptions about C++'s auto keyword, explaining that it follows the same type deduction rules as template...
Ep 286: How Command and Conquer's Dual Screen DOS Support Worked
This episode explores the fascinating history of dual-monitor support in DOS-era computing, specifically how games like Command and Conquer could...
Ep 285: Experiments With Generating Stably Random Game Assets
This episode explores techniques for creating stably random content in games, inspired by classics like Elite that used procedural generation to...
Ep 284: C++20's Safe Integer Comparisons
This episode addresses the problems that arise when comparing signed and unsigned integers in C++. Jason demonstrates how comparing a negative value...
Ep 283: Stop Using const_cast!
This episode explains why using const_cast in C++ is dangerous and should be avoided. Jason demonstrates that modifying const objects leads to...
Ep 282: Quick Perf Tip: Don't Repeat Your Work
This episode examines a performance optimization opportunity found in Dave Plummer's 'Prime Number Sieve' comparison code. Jason identifies that a...
Ep 281: N Times Faster Code With Parallel Algorithms
This episode demonstrates the remarkable performance improvements possible with C++17's parallel algorithms library. Jason showcases a Mandelbrot set...
Ep 280: A Quick Look At The Source To Amazon's O3DE Game Engine (constexpr surprises!)
In this episode, Jason explores Amazon's newly open-sourced O3DE (Open 3D Engine) codebase, examining it from a C++ perspective. Using tools like...
Ep 279: Quick Perf Tip: Use The Right Iterator Comparison
This episode continues the performance analysis of a quicksort implementation, focusing on a subtle but significant optimization in iterator...
Ep 278: `emplace_back` vs `push_back`
This episode explores the differences between emplace_back() and push_back() in C++ standard containers, examining both their semantic differences...
Ep 277: Quick Perf Tip: Avoid Integer Conversions
This episode examines how using the wrong integer type can significantly impact performance. Jason demonstrates a quick sort implementation that was...
Ep 276: C++20's Conditionally `explicit` Conversions
Jason Turner explores C++20's new conditionally explicit specifier, which allows constructors and conversion operators to be explicitly marked based...
Ep 275: Trust Your Standard Library in 3 Simple Steps
Following up on his previous episode comparing std::pair to a custom implementation, Jason Turner outlines three steps for effectively trusting the...
Ep 274: Why Is My Pair 310x Faster Than `std::pair`?
Jason Turner investigates why a simple custom pair implementation outperforms std::pair in benchmarks by up to 310x in some compiler configurations....
Ep 273: C++23's Lambda Simplification (With Commodore 64 Example)
Jason Turner explores a new C++23 feature that simplifies lambda syntax by making parameter lists optional when using lambda specifiers like...
Ep 272: Hello World, Hello Commodore
Jason Turner revisits and updates his Commodore 64 C++ project, now renamed "6502 for C++". He compares different 'Hello World' implementations in...
Ep 271: string.clear() vs string = ""
Jason Turner compares two methods of emptying a std::string: using the clear() member function versus assigning an empty string literal (string =...
Ep 270: Break ABI to Save C++
This episode discusses the importance of breaking ABI (Application Binary Interface) stability to allow C++ to evolve and improve. Jason explains...
Ep 269: How To Use C++20's constexpr std::vector and std::string
Jason explores the newly available constexpr support for std::vector and std::string in C++20, showing how to use these containers in constexpr...
Ep 268: Top 10 C++ Resources You MUST Know About!
Jason Turner presents his top 10 essential C++ resources, compiled with input from his Twitter followers. The list includes online communities like...
Ep 267: C++20's starts_with and ends_with
This episode covers the C++20 additions of starts_with and ends_with methods to std::string and std::string_view. Jason explains how these handy...
Ep 266: C++20's std::shift_left and std::shift_right
This episode explores C++20's new std::shift_left and std::shift_right algorithms, which provide a standardized way to shift elements within...
Ep 265: C++20's std::bit_cast
This episode explores C++20's std::bit_cast, a new function that provides a safe and well-defined way to reinterpret the bit pattern of one type as...
Ep 264: Covariant Return Types and Covariant Smart Pointers
This episode explores covariant return types in C++, which allow a derived class to override a virtual method with a more specific return type. Jason...
Ep 263: Virtual Inheritance: Probably Not What You Think It Is
This episode explains virtual inheritance in C++, a feature that many programmers misunderstand. Jason demonstrates how virtual inheritance solves...
Ep 262: std::string's 11 Confusing Constructors
This episode explores the confusing behavior and inconsistent semantics of std::string's eleven different constructors. Jason demonstrates how two...
Ep 261: C++20's New consteval Keyword
This episode introduces C++20's consteval keyword, which enforces that a function must be evaluated at compile time. Jason explains that consteval is...
Ep 260: C++'s Most Vexing Parse: How To Spot It, Why It Exists, and How To Avoid It
This episode explains C++'s "most vexing parse" problem, a parsing ambiguity that occurs when trying to default-construct an object with empty...
Ep 259: CRTP: What It Is, Some History and Some Uses
This episode explores the Curiously Recurring Template Pattern (CRTP), a C++ design pattern where a class inherits from a template instantiated with...
Ep 258: The Awesome Power of C++20's std::source_location
This episode explores C++20's std::source_location, a powerful new feature for compile-time source code introspection. Jason demonstrates how this...
Ep 257: Garbage In, Garbage Out - Why Initialization Matters
This episode demonstrates why uninitialized variables in C++ lead to undefined behavior and unpredictable program outcomes. Jason shows how different...
Ep 256: C++11's Garbage Collector
Jason explores C++11's little-known garbage collection specification, a feature that was standardized but never implemented by any compiler. The...
Ep 255: C++11-17 Features You Still Cannot Use in 2021
Jason surveys C++11, C++14, and C++17 features that still lack cross-platform compiler support as of January 2021. The most notable omission is...
Ep 254: C++23's signed / unsigned size_t Literals
Jason discusses the first core language feature to be accepted into C++23: literal suffixes for signed and unsigned size_t types. Though not yet...
Ep 253: C++20 is Official! How To Get Your Copy of the Standard
Jason announces that C++20 has been officially released as ISO/IEC 14882:2020 and explains the various ways to access the C++ standard documentation....
Ep 252: Real World PMR: 2-3x Faster JSON Parsing with Custom Allocation Strategies
Jason demonstrates how Polymorphic Memory Resources (PMR) can dramatically improve JSON parsing performance through practical benchmarks. Using...
Ep 251: constexpr Parameters With C++20's CNTTP
Jason explores C++20's Class Non-Type Template Parameters (CNTTP), showing how they enable the use of compile-time known values in contexts where...
Ep 250: Custom Allocation - How, Why, Where (Huge multi threaded gains and more!)
Jason explores the practical benefits of custom memory allocation strategies in C++, particularly using PMR (Polymorphic Memory Resources). He...
Ep 249: Types That Shall Not Be Named
Jason explores three categories of types in C++ that cannot be directly named by the programmer: lambda types (which have compiler-generated unique...
Ep 248: Understand the C++17 PMR Standard Allocators and Track All the Things
Jason provides a comprehensive overview of C++17's Polymorphic Memory Resources (PMR), explaining the different standard memory resources including...
Ep 247: -O3, -Os, -Og, -Oz, Oh My!
Jason explores the various compiler optimization flags available in GCC and Clang, explaining the differences between -O0 (no optimization), -O1/2/3...
Ep 246: (+[](){})() What Does It Mean?
In this short and entertaining episode, Jason deconstructs the cryptic C++ expression (+[](){})(), which he spotted on a t-shirt at the Code Dive...
Ep 245: PMR: Mistakes Were Made (By Me)
In this follow-up to previous PMR episodes, Jason addresses mistakes in his earlier allocator discussions. He clarifies terminology (memory resource...
Ep 244: Channel News, Updates, Thank Yous, and Changes
In this special update episode, Jason Turner shares news about his YouTube channel and related projects. He discusses switching to DaVinci Resolve...
Ep 243: Computer Science: The Magic of Two's Complement Binary Math
In this foundational computer science episode, Jason explores the two's complement representation used for signed integers in computers, now...
Ep 242: Design By Introspection in C++20 (concepts + if constexpr)
In this episode, Jason Turner introduces the 'Design by Introspection' pattern, which combines C++20's concepts with C++17's if constexpr to create...
Ep 241: Using `explicit` to Find Expensive Accidental Copies
In this episode, Jason Turner explores an unconventional debugging technique: using the `explicit` keyword on copy constructors to identify...
Ep 240: Start Using [[nodiscard]]!
In this episode, Jason Turner explores the [[nodiscard]] attribute introduced in C++17 and enhanced in C++20. He demonstrates how it can help prevent...
Ep 239: std::mem_fun vs std::mem_fn Fight!
This episode explores the difference between std::mem_fun (deprecated in C++11, removed in C++17) and its replacement std::mem_fn (introduced in...
Ep 238: const mutable Lambdas?
In this episode, Jason explores the seemingly contradictory concept of 'const mutable lambdas' in C++. He demonstrates why this combination is...
Ep 237: Teach Yourself C++ in ∞ Days
This episode shares Jason's personal journey and methodology for learning C++ through experimentation and hands-on investigation. He demonstrates how...
Ep 236: Creating Allocator-Aware Types
This episode explores how to create custom allocator-aware types in C++ that can properly work with the Polymorphic Memory Resource (PMR) library....
Ep 235: PMR: Amazing, Fast, But, Not Quite Magic
This episode explores C++17's Polymorphic Memory Resources (PMR) in-depth, following up on a previous introduction. Jason demonstrates how PMR can...
Ep 234: map[] vs map.at()
This episode compares the square bracket operator (map[key]) with the at() method (map.at(key)) for accessing std::map elements. Jason examines the...
Ep 233: std::map vs constexpr map (huge perf difference!)
This episode compares the performance of std::map with a simple hand-crafted constexpr map implementation. Jason demonstrates how using a...
Ep 232: C++20's `using enum`
This episode explores the C++20 'using enum' feature, which allows enum class values to be used without full qualification in local scopes. Jason...
Ep 231: Multiple Destructors in C++20?! How and Why
This episode explores C++20's ability to define multiple conditional destructors using concepts. Using a template-like 'optional' class, Jason...
Ep 230: Building A High Performance Bit Pattern Match DSL
This episode demonstrates how to build a high-performance domain-specific language (DSL) for matching bit patterns in C++. Jason implements a...
Ep 229: C++20: Why Deprecate The Comma Operator?
This episode explores why C++20 has deprecated the use of the comma operator in array subscripts. Jason demonstrates how the comma operator can be...
Ep 228: C++20's (High Precision) Mathematical Constants
This episode introduces the new mathematical constants provided in C++20 through the
Ep 227: RPG In C++20 - Part 6: Dealing With Game Events - 2
This episode continues the RPG game engine series, focusing on building a testable event system that can replay game events deterministically. Jason...
Ep 226: The Arrow Operator Is Magic
This episode explores the special behavior of the arrow operator (->) in C++, explaining how it uniquely handles operator overloading. Jason...
Ep 225: Understanding Operator Overloading
Jason provides a comprehensive introduction to operator overloading in C++, demonstrating three different approaches for binary operators: free...
Ep 224: RPG In C++20 - Part 5: Dealing With Game Input Events
In this fifth part of the RPG in C++20 series, Jason continues developing his game engine by improving input handling. He refines the joystick input...
Ep 223: Know Your Standard Library: std::nextafter
Jason highlights the often overlooked std::nextafter function from the C++ standard library, which returns the next representable floating-point...
Ep 222: 3.5x Faster Standard Containers With PMR!
Jason explores C++17's Polymorphic Memory Resources (PMR) to significantly improve container performance. He demonstrates how to use...
Ep 221: Generating a .clang-format For C++ Doom
Jason explores tools for automatically generating a .clang-format configuration file for his C++ Doom project. He demonstrates using two tools -...
Ep 220: C++20's [[likely]] and [[unlikely]] With Practical use Case
Jason examines C++20's new [[likely]] and [[unlikely]] attributes, which provide branch prediction hints to the compiler. These attributes allow...
Ep 219: RPG In C++20 - Part 4: Reading SFML Joystick States
In this fourth part of the RPG in C++20 series, Jason focuses on handling user input through joysticks/gamepads using the SFML library. He explores...
Ep 218: C++20's std::to_array
This episode explores C++20's std::to_array utility function, which allows converting C-style arrays to std::array. Jason demonstrates how this...
Ep 217: Doom vs C++: Round 1: Initial Results
Jason compares performance metrics between the original Crispy Doom (C code) and his C++ port. Surprisingly, the C++ version produces a slightly...
Ep 216: C++20's lerp, midpoint And Why They Are Necessary
This episode introduces two new C++20 standard library functions: std::lerp (linear interpolation) and std::midpoint. Jason demonstrates why these...
Ep 215: An RPG in C++20: Part 3 - Handling Command Line Parameters
In this episode of the C++20 RPG series, Jason implements command-line parameter handling using the docopt library. He upgrades the project to C++20,...
Ep 214: Epic 10 Hour Port of Doom to C++
Ep 213: CTRE: Compile Time Regular Expressions
Jason introduces CTRE (Compile Time Regular Expressions), a library by Hana DusÃková that processes regular expressions at compile time rather than...
Ep 212: An RPG In C++20 - Part 2: Finding Errors As Soon As Possible
In this episode of his C++20 RPG series, Jason demonstrates how to establish a robust development environment that catches errors early. He enables...
Ep 211: C++20's Bit Manipulation Functions
Jason explores the new bit manipulation utilities in C++20's
Ep 210: An RPG in C++20 - Part 1: Getting Started With SFML & Dear ImGui
Jason sets up the initial project structure for his C++20 RPG game series using the C++ Starter Project template as a foundation. He walks through...
Ep 209: An RPG in C++20 - Part 0: The Plan
In this introductory episode, Jason Turner outlines his upcoming series about building a 2D top-down RPG game using C++20. He discusses the project's...
Ep 208: The Ultimate CMake / C++ Quick Start
In this extensive episode, Jason tours his `cpp_starter_project` GitHub repository, which serves as a comprehensive modern CMake template for C++...
Ep 207: C++20's jthread and stop_token
This episode introduces C++20's new thread management features: std::jthread and std::stop_token. Jason demonstrates how std::jthread enhances the...
Ep 206: Surprising Conversions with CTAD
In this episode, Jason explores a potential pitfall with Class Template Argument Deduction (CTAD) in C++17, specifically related to implicit...
Ep 205: Christmas Class 2019 - Chapter 5 of 5 Answers
This final episode of Jason's five-part Christmas class series provides answers to the questions posed in Chapter 5. Jason explains that lambdas...
Ep 204: Christmas Class 2019 - Chapter 5 of 5 - Lambdas To The Limits
This episode concludes Jason's five-part Christmas class series on lambdas with 'Lambdas To The Limits', focusing on advanced and sometimes unusual...
Ep 203: Christmas Class 2019 - Chapter 4 of 5 - The Evolution of Lambdas
This episode is the fourth chapter in Jason's special five-part Christmas class series on lambdas. Jason first explains the solution to Chapter 3's...
Ep 202: Christmas Class 2019 - Chapter 3 of 5 - Utilizing Lambdas
This episode is the third chapter in Jason's five-part Christmas class series on lambdas, focusing on practical applications. First, Jason reviews...
Ep 201: Christmas Class 2019 - Chapter 2 of 5 - Building On Lambdas
This episode serves as the second chapter in Jason's special five-part series on lambdas, focusing on practical applications and advanced techniques....
Ep 200: Christmas Class 2019 - Chapter 1 of 5 - Understanding Lambdas
In this landmark 200th episode, Jason kicks off a special five-part educational series on C++ lambdas. This first chapter provides an introduction to...
Ep 199: [[nodiscard]] Constructors And Their Uses
This episode explores how to apply the [[nodiscard]] attribute to constructors in C++20, which warns when constructor results are ignored. Jason...
Ep 197: 25 Years of Best Practices
This episode examines how certain C++ best practices have remained unchanged for 25 years by testing them in Borland C++ for OS/2 from 1994. Jason...
Ep 196: What is `requires requires`?
This episode explores the curious `requires requires` syntax in C++20 concepts. Jason explains that this pattern appears when making ad-hoc...
Ep 195: C++20's `constinit`
This episode explains C++20's new constinit keyword, which forces variables to be initialized at compile time without making them constant. Jason...
Ep 194: From SFINAE To Concepts With C++20
This episode explores the evolution from SFINAE (Substitution Failure Is Not An Error) to C++20's Concepts feature. Jason demonstrates how...
Ep 193: C++20's `contains` Members
This episode introduces the new contains() member function coming in C++20 for associative containers (set, multiset, map, multimap, unordered_set,...
Ep 192: Stop Using Double Underscores
In this episode, Jason explains why using double underscores or leading underscores in C++ identifiers invokes undefined behavior. The C++ standard...
Ep 191: Cevelop IDE With CMake Based Projects
This episode explores Cevelop, a free and open-source Eclipse-based C++ IDE with powerful refactoring and code analysis capabilities. Jason...
Ep 190: The Important Parts of C++17 in 10 Minutes
This episode presents a concise overview of the most important features in C++17. Jason highlights guaranteed copy elision, constexpr additions to...
Ep 189: C++14's Variable Templates
This episode explores C++14's variable templates, a feature that Jason admits he didn't fully appreciate until years after its introduction. He...
Ep 188: C++20's `constexpr` `new` Support
This episode introduces C++20's new capability to perform dynamic memory allocation in compile-time constexpr contexts. Jason demonstrates how you...
Ep 187: C++20's `constexpr` Algorithms
This episode explores one of C++20's significant improvements: the addition of constexpr qualifiers to most standard algorithms. Jason demonstrates...
Ep 186: What Are Callables?
This episode explains what callable objects are in C++, defining them as anything that can be treated like a function (called with parentheses)....
Ep 185: Stop Using reinterpret_cast!
This episode focuses on why using reinterpret_cast in C++ is problematic and should be avoided. Jason explains that reinterpret_cast typically...
Ep 184: What Are Higher Order Functions?
This episode explains the concept of higher-order functions in C++, defined as functions that either take functions as parameters or return functions...
Ep 183: Start Using Raw String Literals
This episode introduces raw string literals, a feature added in C++11 that simplifies working with complex strings. Jason demonstrates how raw string...
Ep 182: Overloading In C and C++
This episode explores the differences between function overloading in C and C++. Jason demonstrates how C++ naturally supports function overloading...
Ep 181: Fixing Our bind_front with std::invoke
This episode revisits Jason's previous implementation of std::bind_front from C++20 using lambdas, but addresses a critical limitation: the inability...
Ep 180: Whitespace Is Meaningless
This episode explores how whitespace is largely insignificant in C++ syntax, a trait inherited from C. Jason demonstrates how the preprocessor...
Ep 179: Power C - A Native C Compiler for the Commodore 64
In this unique episode, Jason demonstrates Power C, a C compiler for the Commodore 64 that was his first introduction to compiled languages. The...
Ep 178: The Important Parts of C++14 In 9 Minutes
This episode provides a concise overview of the most important features added in C++14, which Jason describes as essentially a 'bug fix' to C++11...
Ep 177: `std::bind_front` Implemented With Lambdas
This episode demonstrates how to implement C++20's std::bind_front functionality using modern C++ features. Jason shows a concise implementation...
Ep 176: Important Parts of C++11 in 12 Minutes
This episode provides a concise overview of the six most significant features introduced in C++11. Jason explains how auto type deduction,...
Ep 175: Spaceships in C++20: operator 〈=〉
This episode introduces C++20's spaceship operator (operator<=>), a powerful new language feature that simplifies comparison operations. Jason...
Ep 174: C++20's `std::bind_front`
This episode introduces std::bind_front, a new functional utility coming in C++20. Jason explains how bind_front is a simpler and more focused...
Ep 173: The Important Parts of C++98 in 13 Minutes
This episode provides a comprehensive overview of the most important features that define C++98/03. Jason identifies four fundamental aspects that...
Ep 172: Execution Support in Compiler Explorer
This episode introduces a significant new feature in Compiler Explorer: execution support in the public web version. Jason announces that users can...
Ep 171: C++20's Parameter Packs In Captures
This episode explores a C++20 enhancement to lambda expressions: the ability to expand parameter packs in lambda captures. Jason demonstrates how...
Ep 170: C++17's `inline` Variables
This episode examines C++17's inline variables feature, which simplifies the declaration and definition of static class members. Jason demonstrates...
Ep 169: C++20 Aggregates With User Defined Constructors
This episode examines a subtle language change in C++20 that affects aggregate initialization. Jason demonstrates how in C++17, structures with...
Ep 168: Discovering Warnings You Should Be Using
This episode explores how to discover and leverage useful compiler warnings in C++. Jason demonstrates using -Wall in Visual Studio and -Weverything...
Ep 167: What Is Variable Shadowing?
This episode explains variable shadowing in C++, which occurs when a variable declared in an inner scope has the same name as a variable in an outer...
Ep 166: C++20's Uniform Container Erasure
This episode explores a new feature in C++20 called uniform container erasure that simplifies removing elements from standard containers. Jason...
Ep 165: C++20's is_constant_evaluated()
This episode explores the C++20 feature `std::is_constant_evaluated()` from the
Ep 164: Adding a Random Device To The C++ Box
This episode continues exploring the C++ Box project by implementing a random number generator device. Jason demonstrates how to add a memory-mapped...
Ep 163: Practicing ARM Assembly
This episode explores writing ARM assembly language using the C++ Box project. Jason demonstrates how to use inline assembly within C++ to manipulate...
Ep 162: Recursive Lambdas
This episode demonstrates how to implement recursive lambda functions in C++. Jason shows how to create a Fibonacci implementation using lambdas that...
Ep 161: The C++ Box Project
This episode introduces C++ Box, Jason's open-source ARMv4 emulator project written in 100% portable C++. The project provides an integrated...
Ep 160: Argument Dependent Lookup (ADL)
This episode explains Argument Dependent Lookup (ADL), a C++ language feature that enables calling functions without fully qualifying their namespace...
Ep 159: `constexpr` `virtual` Members In C++20
This episode explores a new C++20 feature allowing virtual functions to be constexpr, which was previously disallowed in C++17 and earlier. Jason...
Ep 158: Getting The Most Out Of Your CPU
This episode demonstrates how to instruct compilers to leverage CPU-specific optimizations through compiler flags. Jason shows how to enable advanced...
Ep 157: Never Overload Operator && or ||
In this episode, Jason explains why you should never overload the logical operators && and || in C++. Using a simple example with Compiler Explorer,...
Ep 156: A C++ Conference Near You
In this informational episode, Jason provides an overview of C++ conferences taking place around the world in 2019. He highlights several events...
Ep 155: Misuse of pure Function Attribute
This episode examines potential dangers when using GNU's function attributes `pure` and `const`. Using Compiler Explorer, Jason demonstrates how...
Ep 154: One Simple Trick For Reducing Code Bloat
In this episode, Jason reveals a common but often overlooked C++ optimization: not defining destructors when they aren't needed. Using Compiler...
Ep 153: 24-Core C++ Builds Using Spare Computers!
In this practical episode, Jason demonstrates how to use icecream (a fork of distcc) to create a distributed build environment that utilizes multiple...
Ep 152: Lambdas: The Key To Understanding C++
In this episode, Jason makes a compelling case that understanding lambdas is a gateway to mastering the most important aspects of C++. He...
Ep 151: C++20's Lambdas As Custom Comparators
This episode demonstrates how C++20's lambda improvements simplify custom comparators in container classes. Jason revisits his previous Episode 94 on...
Ep 150: C++20's Lambdas For Resource Management
This episode explores how C++20's lambda enhancements significantly improve resource management patterns. Jason demonstrates a practical application...
Ep 149: C++20's Lambda Usability Changes
In this episode, Jason explores three important lambda enhancements introduced in C++20: default constructible stateless lambdas, assignable...
Ep 148: clang-tidy Checks To Avoid
In this episode, Jason discusses important considerations when using clang-tidy, specifically addressing which checks to avoid. He cautions against...
Ep 147: C++ And Python Tooling
This episode explores several Python-based tools that can be installed via pip to enhance C++ development workflows. Jason introduces Lizard for...
Ep 146: C++20's std::to_address
This episode explores std::to_address, a new utility coming in C++20 that extracts the underlying raw pointer from smart pointers and pointer-like...
Ep 145: Semi-Automatic `constexpr` and `noexcept`
This episode demonstrates Visual Studio 2017's built-in static analysis capabilities for automatically detecting when functions can be marked as...
Ep 144: Pure Functions in C++
This episode explores GNU's 'pure' and 'const' function attributes which allow developers to communicate that functions have no external side effects...
Ep 143: GNU Function Attributes
This episode explores GNU function attributes focusing on the 'always_inline' attribute as an example. Jason demonstrates how to use this...
Ep 142: Short Circuiting With Logical Operators
Jason Turner shares a subtle bug he encountered related to short-circuiting with the logical OR operator. He describes how in his ARM emulator, he...
Ep 141: C++20's Designated Initializers And Lambdas
Jason Turner explores C++20's designated initializers, clarifying the correct syntax (.member = value) and demonstrating that they enforce type...
Ep 140: Use `cout`, `cerr`, and `clog` Correctly
Jason Turner explains the proper use of C++'s standard output streams: cout, cerr, and clog. He argues against the common practice of using...
Ep 139: References To Pointers
Jason Turner explores the complex topic of references to pointers in C++, demonstrating how they differ from regular references and pointers. He...
Ep 138: Will It C++? MIPS Architecture (1985)
Jason Turner explores modern C++ capabilities on the MIPS architecture, a RISC processor design from 1985 that remains widely used in networking...
Ep 137: C++ Is Not An Object Oriented Language
Jason Turner challenges the common misconception that C++ is strictly an object-oriented programming language. He demonstrates that C++ supports...
Ep 136: How `inline` Might Affect The Optimizer
Jason Turner explores how the 'inline' keyword affects compiler optimization decisions, using Clang's optimization viewer to demonstrate its impact....
Ep 135: {fmt} is Addictive! Using {fmt} and spdlog
Jason Turner explores the {fmt} library and spdlog, demonstrating how they provide a cleaner, more intuitive alternative to C++'s iostream for string...
Ep 134: The Best Possible Way To Create A Visitor?
Jason Turner revisits his approach to creating visitors by inheriting from lambdas, demonstrating significant improvements using C++17 features. He...
Ep 133: What Exactly IS A Lambda Anyhow?
In this episode, Jason Turner breaks down what a C++ lambda is by demonstrating its equivalent implementation if written manually. He explains that a...
Ep 132: Lambdas In Fold Expressions
This episode explores a creative technique using lambdas within C++17 fold expressions. Jason demonstrates how to capture variadic template...
Ep 131: Literals in ARM Assembly
This episode explores how integer literals are handled in ARM assembly compared to x86-64. Jason demonstrates that while Intel processors can...
Ep 130: C++20's for init-statements
This episode explores C++20's new for loop init-statements, an extension to range-based for loops that allows variable declarations before the loop...
Ep 129: The One Feature I'd Remove From C++
In this episode, Jason identifies the implicit conversion of C-style arrays to pointers as the most dangerous feature he would remove from C++....
Ep 128: C++20's Template Syntax For Lambdas
This episode explores C++20's new template syntax for lambdas, which extends C++14's generic lambdas with explicit template parameters. Jason...
Ep 127: C++20's Designated Initializers
This episode introduces designated initializers, a new feature in C++20 that allows explicitly naming structure members during initialization. Jason...
Ep 126: Lambdas With Destructors
This episode explores how to create lambdas with destruction behavior by capturing objects with custom destructors. Jason demonstrates how lambdas...
Ep 125: The Optimal Way To Return From A Function
This episode examines various approaches to returning values from functions and their performance implications. Jason demonstrates how different...
Ep 124: ABM and BMI Instruction Sets
This episode explores the Advanced Bit Manipulation (ABM) and Bit Manipulation Instruction (BMI) sets available in modern CPUs. Jason demonstrates...
Ep 123: Using in_place_t
This episode explores the in_place_t constructor parameter used with std::optional, std::variant, and std::any for efficient in-place object...
Ep 122: `constexpr` With `optional` And `variant`
This episode explores the capabilities and limitations of using std::optional and std::variant in constexpr contexts in C++17. Jason clarifies that...
Ep 121: Strict Aliasing In The Real world
This episode demonstrates a real-world example of how strict aliasing rules can affect code performance and optimization. Jason shows how the...
Ep 120: Will It C++? The Tandy 1000 From 1984
This episode explores whether modern C++ code can run on the Tandy 1000 SL 2 from 1984, which featured an 8086 processor running at 8 MHz with 512KB...
Ep 119: Negative Cost Structs
This episode explores how using structs to group related data can lead to more efficient code, particularly on the 64-bit Intel ABI. Jason...
Ep 118: Trying Out The vcpkg Package Manager
This episode explores the vcpkg package manager from Microsoft, completing Jason's three-part series on C++ package managers. He demonstrates how to...
Ep 117: Trying Out The Hunter Package Manager
In this episode, Jason explores the Hunter package manager for C++, continuing his mini-series on C++ package managers. He demonstrates how to set up...
Ep 116: Trying Out The Conan Package Manager
This episode begins a mini-series on C++ package managers, starting with Conan. Jason documents his first-time experience setting up and using Conan...
Ep 115: Compile Time ARM Emulator
This episode demonstrates a completely compile-time ARM emulator that can execute ARM instructions and verify their results during compilation. Jason...
Ep 114: cpp_starter_project GUI Additions
This episode showcases additions to the CPP Starter Project that introduce examples for four different GUI toolkits: FLTK, GTKMM, Dear ImGui, and...
Ep 113: Will It C++? Atari Touch Me From 1978
This episode explores whether it's possible to compile C++ code for the PIC16 microcontroller used in the Atari Touch Me handheld game from 1978....
Ep 112: GCC's Leaky Abstractions
This episode explores how GCC's implementation details sometimes 'leak' into the C++ code through compiler warnings and error messages, exposing...
Ep 111: kcov
This episode introduces kcov, a user-friendly code coverage tool for C++ on Linux systems. Jason demonstrates how kcov significantly simplifies the...
Ep 110: gdbgui
This episode introduces gdbgui, a browser-based frontend for GDB that provides a modern graphical debugging experience for C++ on Unix systems. Jason...
Ep 109: When noexcept Really Matters
This episode demonstrates the practical importance of the noexcept specifier in C++ by showing how it affects std::vector's reallocation behavior....
Ep 108: Understanding emplace_back
This episode explains how emplace_back works in C++11 compared to push_back by demonstrating the difference in object construction and move...
Ep 107: The Power of =delete
Building on his previous episode about disabling moves from const objects, Jason explores the power of the =delete specifier in C++11. He...
Ep 106: Disabling Move From const
Jason explores how to explicitly disable moving from const objects in C++. Following up on his previous episodes about why you cannot move from const...
Ep 105: Learning "Modern" C++ - 5: Looping and Algorithms
In this final episode of the Learning Modern C++ series, Jason demonstrates how static analysis tools can help transform traditional C++ code into...
Ep 104: Learning "Modern" C++ - 4 : const and constexpr
In this fourth episode of the Learning Modern C++ series, Jason explores how static analysis tools can guide you toward proper use of const and...
Ep 103: Learning "Modern" C++ - 3: Inheritance
In this third episode of the Learning Modern C++ series, Jason demonstrates how static analysis tools can help identify and fix common...
Ep 102: Learning "Modern C++" - 2: Hello World
In this second episode of the "Learning Modern C++" series, Jason demonstrates how to set up a proper Hello World project with modern C++ practices....
Ep 101: Learning "Modern" C++ - 1: The Tools
This episode begins a series on learning modern C++, focusing first on setting up the right development environment. Jason demonstrates how to set up...
Ep 100: All The Assignment Operators
Jason explores the complete set of possible assignment operator variants in C++. He explains how the canonical copy and move assignment operators are...
Ep 99: C++ 20's Default Bit-field Member Initializers
Jason explores one of the first available C++20 features: default initialization for bit-field members. He demonstrates how C++20 allows in-class...
Ep 98: Precision Loss with Accumulate
This episode highlights a subtle but significant issue when using std::accumulate with floating-point values but an integer accumulator. Jason...
Ep 97: Lambda To Function Pointer Conversion
This episode explores the often-overlooked capability of converting non-capturing lambdas to function pointers in C++. Jason demonstrates how this...
Ep 96: Transparent Lambda Comparators
This episode combines concepts from prior episodes about lambda comparators and transparent comparators, demonstrating how to create efficient...
Ep 95: Transparent Comparators
This episode explores transparent comparators, a C++14 feature that enables more efficient lookups in associative containers like std::set and...
Ep 94: Lambdas as Comparators
This episode builds on the previous one about custom comparators for containers, exploring how to use lambdas as comparators for associative...
Ep 93: Custom Comparators for Containers
This episode explains how to use custom comparators with C++ standard library associative containers like std::set and std::map. Jason demonstrates...
Ep 92: function-try-blocks
This episode explores function-try-blocks, a rarely used C++ feature that allows wrapping an entire function body in a try-catch block. Jason...
Ep 91: Using Lippincott Functions
This episode explores the concept of Lippincott functions, named after Lisa Lippincott, as a technique for centralizing exception handling code....
Ep 90: Using Codecov and Project Badges
Ep 89: Overusing Lambdas
This episode discusses a potential pitfall of overusing lambda expressions in C++. Jason shares a real-world example from his work on ChaiScript...
Ep 88: Don't Forget About puts
This episode highlights the often-overlooked puts() function from the C standard library, which remains available in C++. Jason compares different...
Ep 87: std::optional
This episode explores std::optional, a C++17 feature that provides a way to represent optional values without dynamic memory allocation. Jason...
Ep 86: Valgrind
This episode examines Valgrind, a powerful dynamic analysis tool for detecting memory errors in C++ programs without requiring source code...
Ep 85: Fuzz Testing
This episode explores fuzz testing in C++, a powerful technique for discovering bugs by generating random or mutated inputs. Jason demonstrates...
Ep 84: C++ Sanitizers
This episode explores C++ sanitizers, powerful runtime analysis tools available in Clang and GCC. Jason demonstrates the Address Sanitizer that...
Ep 83: Installing Compiler Explorer
This episode demonstrates how to set up a local installation of Compiler Explorer (Godbolt) on Linux. Jason walks through the process of cloning the...
Ep 82: Intro To CTest
This episode demonstrates how to add automated testing to a CMake-based C++ project using CTest. Jason builds on his previous episodes about CMake,...
Ep 81: Basic Computer Architecture
This episode provides a high-level overview of computer architecture, explaining how computers fundamentally operate according to the von Neumann...
Ep 80: Intro to AppVeyor
This episode demonstrates how to add AppVeyor continuous integration to a C++ project, complementing the Travis CI setup from the previous episode....
Ep 79: Intro To Travis CI
This episode demonstrates how to add Travis CI continuous integration to a CMake-based C++ project. Jason explains the process of creating a...
Ep 78: Intro to CMake (Old version - see links)
This episode provides an introduction to CMake, showing how to set up a basic cross-platform C++ project. Jason demonstrates creating a simple...
Ep 77: G++ 7.1 for DOS
This episode explores using modern C++ compilers in the DOS operating system. Jason demonstrates how to install and use DJGPP (DJ's GNU Programming...
Ep 76: static_print
This episode explores the concept of printing information at compile time using a proposal called 'static_print'. Jason demonstrates a patched...
Ep 75: Why You Cannot Move From Const
This episode explains why attempting to move from a const object in C++ silently falls back to copying instead. Jason demonstrates that using...
Ep 74: std::regex optimize
This episode examines the performance impact of the std::regex_constants::optimize flag and common regex usage patterns. Jason conducts several...
Ep 73: std::string_view
This episode explores std::string_view, a new C++17 feature that provides a non-owning reference to a sequence of characters. Jason demonstrates how...
Ep 72: Hidden C++17 - Part 2
This episode continues Jason's exploration of lesser-known C++17 features, focusing on std::shared_mutex and mathematical special functions. Jason...
Ep 71: Hidden C++ 17 - Part 1
This episode explores lesser-known features added to the C++17 standard library. Jason covers several additions including multi-line support in...
Ep 70: C++ IIFE in quick-bench.com
This episode explores using Immediately Invoked Function Expressions (IIFE) in C++ for initializing constant values conditionally. Jason compares two...
Ep 69: C++17's Searchers
In this episode, Jason explores C++17's additions to the standard search algorithms: the Boyer-Moore searcher and Boyer-Moore-Horspool searcher....
Ep 68: std::iota
In this episode, Jason introduces std::iota, a C++11 algorithm from the
Ep 67: C++17's std::gcd and std::lcm
In this episode, Jason introduces two useful mathematical functions added to the C++17 standard library: std::gcd for finding the greatest common...
Ep 66: Variadic fmin for C++11
In this episode, Jason demonstrates how to implement a variadic version of std::fmin in C++11, revisiting his previous episodes on custom variadic...
Ep 65: C++11's std::fmin
In this episode, Jason explores C++11's std::fmin function, which provides special handling for floating-point comparisons involving NaN (Not a...
Ep 64: C++11's std::min (and my version)
In this episode, Jason explores C++11's enhancement to std::min that allows finding the minimum value from an initializer list. He demonstrates how...
Ep 63: What is Negative Zero?
In this episode, Jason explores the concept of negative zero in floating-point arithmetic. He demonstrates how -0.0 is a distinct value from +0.0 in...
Ep 62: std::regex
In this episode, Jason provides a concise introduction to std::regex, a feature added in C++11 that he considers underappreciated due to its delayed...
Ep 61: Storage Duration with Lambdas
In this episode, Jason explores an unusual but interesting aspect of C++ lambdas: manipulating their state's storage duration. He demonstrates how to...
Ep 60: std::quoted
In this short episode, Jason introduces std::quoted, an underappreciated utility function added in C++14 that handles the proper quoting and escaping...
Ep 59: Negative Cost Embedded C++ - Part 2
This episode continues the 'Negative Cost Embedded C++' series, focusing on further optimizing embedded code by consolidating multiple register...
Ep 58: Negative Cost Embedded C++ - Part 1
This episode demonstrates how modern C++ features can be used to optimize embedded systems code for the MSP430 microcontroller, reducing program size...
Ep 57: Dissecting An Optimization
In this episode, Jason explores why Clang's simple optimization approach for summing integers can outperform GCC's complex SSE-based implementation....
Ep 56: Zero Cost Embedded C++ - Part 3
In this third episode on zero-cost embedded C++, Jason demonstrates how to use modern C++ features to improve interrupt handling on the TI MSP430...
Ep 55: Zero Cost Embedded C++ - Part 2
This episode continues Jason's exploration of C++14 on the TI MSP430 microcontroller with only 2KB of flash and 128 bytes of RAM. He expands on the...
Ep 54: Zero Cost Embedded C++ - Part 1
In this first part of a series on embedded C++ programming, Jason demonstrates how to use modern C++ (C++14/17) on extremely resource-constrained...
Ep 53: Gotos Are Everywhere
In this episode, Jason challenges the notion that 'goto' statements are universally evil by demonstrating how many C++ control structures are...
Ep 52: C++ To C Compilation
In this episode, Jason explores LLVM's C backend which compiles C++ code to C instead of machine code. He demonstrates how various C++ constructs...
Ep 51: Advanced Stateful Lambdas
This episode explores advanced techniques for creating interactive stateful lambdas in C++. Building on a previous episode about basic stateful...
Ep 50: Inheriting Lambdas vs Generic Lambdas
This episode compares two techniques for handling multiple types in a callable object: inheriting from multiple lambdas (as shown in previous...
Ep 49: Why Inherit From Lambdas?
This episode answers viewer questions about the practical applications of inheriting from lambdas, a technique previously demonstrated in episodes 40...
Ep 48: C++17's Variadic `using`
This episode explores C++17's variadic 'using' declarations by extending the example from Episode 40 on inheriting from lambdas. Jason demonstrates...
Ep 47: My Visual C++ Pet Peeve
This episode highlights one of Jason's major pet peeves with Microsoft's Visual C++ compiler: its non-standard handling of non-const references to...
Ep 46: Start Using Visual C++
This episode makes a compelling case for using Microsoft's Visual C++ compiler (MSVC) as part of your automated build chain. Jason demonstrates how...
Ep 45: Compile Time Maze Generator (and Solver)
This episode demonstrates how to create a compile-time maze generator and solver using constexpr in C++14/17. Building on the constexpr random number...
Ep 44: constexpr Compile Time Random
This episode demonstrates how to implement a compile-time random number generator using constexpr in C++. Jason presents a pseudorandom number...
Ep 43: Stack Elision?
This episode introduces the concept of 'stack elision', a term Jason coined to describe compiler optimizations that eliminate stack-allocated...
Ep 42: Clang's Heap Elision
This episode examines a powerful optimization capability specific to the Clang compiler called heap elision. Jason demonstrates how Clang can...
Ep 41: C++17's constexpr Lambda Support
This episode explores C++17's new constexpr lambda support and its practical impact on compile-time programming. Jason demonstrates how this feature,...
Ep 40: Inheriting From Lambdas
This episode explores the technique of inheriting from lambdas in C++, a powerful but rarely used feature. Jason demonstrates how lambdas are...
Ep 39: C++17's Deduction Guides
This episode continues the exploration of C++17's class template argument deduction by focusing on deduction guides, a feature that enables template...
Ep 38: C++17's Class Template Argument Type Deduction
This episode explores C++17's class template argument type deduction, a feature that eliminates the need for explicit template arguments or maker...
Ep 37: Stateful Lambdas
This episode explores stateful lambdas in C++11 and C++14, demonstrating how to create lambdas that maintain internal state between invocations....
Ep 36: Reading Assembly Language - Part 3
This episode concludes the assembly language series by exploring how the same C++ code gets compiled to different instruction set architectures....
Ep 35: Reading Assembly Language - Part 2
This episode continues the assembly language primer series, focusing on how compilers optimize arithmetic operations. Jason demonstrates the LEA...
Ep 34: Reading Assembly Language - Part 1
This episode provides a primer on reading x86 assembly language, which is essential for understanding compiler optimizations. Jason demonstrates how...
Ep 33: Start Using Default Member Initializers
This episode continues the discussion on the cost of C++ constructs in debug builds by examining default member initializers introduced in C++11....
Ep 32: Lambdas For Free
This episode examines the performance impact of using lambdas in C++. Jason demonstrates that while lambdas generate additional assembly code in...
Ep 31: IncludeOS
This episode explores IncludeOS, a novel C++ framework that allows developers to compile C++ applications into standalone, bootable operating...
Ep 30: C++17's [[nodiscard]] Attribute
This episode covers C++17's new [[nodiscard]] attribute, which addresses a common criticism of return-value error codes by ensuring developers don't...
Ep 29: C++17's [[maybe_unused]] Attribute
This episode introduces C++17's new [[maybe_unused]] attribute, which allows developers to explicitly mark entities that might not be used in certain...
Ep 28: C++17's [[fallthrough]] Attribute
This episode explains C++17's new [[fallthrough]] attribute, which explicitly indicates when a case in a switch statement is meant to fall through to...
Ep 27: C++17 Changes To Sequence Containers
This episode explains key changes to sequence containers (std::array, std::vector, std::deque, std::forward_list, and std::list) in C++17. The most...
Ep 26: Language Features Removed in C++17
This episode explores several language features and standard library components that are being removed in C++17. Jason demonstrates core language...
Ep 25: C++17's Aggregate Initializations
This episode explores C++17's enhanced aggregate initialization features that now support initialization of base classes. Jason demonstrates the...
Ep 24: C++17's Structured Bindings
This episode demonstrates structured bindings, a powerful new feature in C++17 that simplifies working with compound data structures. Jason shows the...
Ep 23: C++17's __has_include
This episode explores `__has_include`, a new feature in C++17 that allows developers to check if a specific header file is available before...
Ep 22: C++17's Nested Namespaces and `std::clamp`
This episode covers two new features coming in C++17. First, Jason introduces nested namespace definitions, which allow developers to declare...
Ep 21: C++17's `if` and `switch` Init Statements
This episode introduces C++17's new feature that allows initialization statements within if and switch conditions. Jason demonstrates how this syntax...
Ep 20: C++17's Fold Expressions - Introduction
This episode introduces fold expressions, a powerful new feature in C++17 that simplifies operations on parameter packs. Jason compares the verbose...
Ep 19: C++14 For The Commodore 64
This episode demonstrates how modern C++14 features can be used to write efficient code for the Commodore 64. Jason uses Compiler Explorer to show...
Ep 18: C++17's constexpr if
This episode explores C++17's newly approved 'constexpr if' feature, which allows for compile-time conditional branching. Jason demonstrates how the...
Ep 17: C++17's `std::invoke`
This episode explores `std::invoke`, one of Jason's favorite new features in C++17. The feature provides a uniform interface for calling any callable...
Ep 16: Avoiding `std::bind`
This episode builds on the previous one about std::bind by explaining why lambdas are almost always a better alternative in modern C++. Jason...
Ep 15: Using `std::bind`
This episode explores std::bind, a utility introduced in C++11 (originally from Boost) that creates function objects by binding arguments to callable...
Ep 14: Standard Library Gems: `next` and `exchange`
This episode highlights two useful but often overlooked functions in the C++ standard library: std::next and std::exchange. Jason demonstrates how...
Ep 13: Fibonacci: You're Doing It Wrong
This episode explores multiple approaches to calculating Fibonacci numbers in C++, highlighting the trade-offs between different implementations....
Ep 12: C++17's std::any
This episode introduces std::any, a new type-safe container from C++17 that can hold a single value of any type. Jason demonstrates how to create,...
Ep 11: std::future Part 2
This episode clarifies and expands upon the std::future concepts introduced in Episode 9. Jason explains the launch policies of std::async: the...
Ep 10: Variadic Expansion Wrap-Up
This episode builds on previous variadic template discussions, focusing on guaranteed execution order in parameter pack expansions. Jason...
Ep 9: std::future Quick-Start
This episode provides a quick introduction to C++11's std::future and std::async capabilities for multithreaded programming. Jason demonstrates how...
Ep 8: C++ Name Demangling
This episode explains C++ name mangling, the process by which compilers encode function and variable names to support function overloading and other...
Ep 7: Stop Using std::endl
This episode explains why using std::endl for line breaks in C++ stream operations can significantly impact performance. Jason demonstrates that...
Ep 6: Intro To Variadic Templates
This episode provides an introduction to variadic templates in C++11, showing how they allow functions to accept an arbitrary number of parameters of...
Ep 5: Intro To ChaiScript
This episode introduces ChaiScript, a header-only scripting library for C++ that enables seamless integration of scripting capabilities into C++...
Ep 4: Variadic Template Refactor
This episode demonstrates the refactoring of legacy code in the ChaiScript project from multiple template function overloads to a single variadic...
Ep 3: Intro to clang-tidy
This episode provides an introduction to clang-tidy, a powerful static analysis tool for C++ that consolidates functionality from other Clang tools...
Ep 2: Cost of Using Statics
This episode explores the hidden performance costs associated with accessing static variables in C++. Jason demonstrates how static variable access...
Ep 1: ChaiScript_Parser Initialization Refactor
In this inaugural episode, Jason refactors the initialization code for the ChaiScript parser to improve performance and maintainability. The focus is...