Logo

Programming Linux

Quick search

Navigation

Courses

  • Courses Overview
  • Slide Material
    • Linux
    • Python Programming
    • The C Programming Language
    • C++: TODO List
    • C++: Miscellaneous Live-Hacking
    • C++
    • The New C++ (11-…)
      • Introduction
      • Delegating Constructor
      • Strongly Typed enum
      • New OO Features: = delete, = default, override, final
      • Attributes
      • Brace Initialization (Uniform Initialization)
      • Local Variables In Control Flow Statements
      • Duck Typing (Err, auto) Without A Duck
      • Tuple Unpacking (Err, Structured Binding)
      • Range Based for Loops
      • Miscellaneous
      • Lambda
      • const, constexpr, constinit, consteval
      • std::bind, std::function
      • Smart Pointers (std::unique_ptr, std::shared_ptr)
      • Move Semantics, Rvalue References
      • Perfect Forwarding
      • Multithreading, C++ Memory Model
      • std::any, std::variant, std::optional
        • A Better void*: std::any
        • New-Style Union: std::variant
      • std::chrono
      • std::filesystem
      • The Spaceship Operator <=> (And Comparison In General)
      • Concepts
      • Ranges
      • Coroutines
      • Modules
      • Drafts
      • Exercises
      • From Concrete To Polymorphic (class Sensor)
    • Design Patterns With C++
    • C++ Code
    • C++ Exercises
    • CMake
    • Is Software A Craft? Software Is A Craft! ⟶ Clean Code
    • Unit Testing With googletest
  • How To Book
  • Log Of Past Courses

About

  • Myself: Contact, Impressum, …
  • This Site

Blog

  • Posts

std::any, std::variant, std::optional¶

  • Topics

Topics¶

  • A Better void*: std::any
  • New-Style Union: std::variant
©2019-2025 (GPLv3), Jörg Faschingbauer. | Page source