Skip to main content
Ctrl+K
Jörg Faschingbauer - Home Jörg Faschingbauer - Home
  • Training Courses
  • About
  • Blog
  • Training Courses
  • About
  • Blog

Section Navigation

  • Course Descriptions
  • Pricing, Organizational
  • Log Of Past Courses
  • Complete Slide Material
    • Linux
    • Python Programming
    • The C Programming Language
    • C++ < 11
    • C++ >= 11
      • Introduction
      • The Rule Of Three/Five/Zero
      • 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
      • The constexpr Engine
      • std::bind, std::function
      • Smart Pointers: std::unique_ptr, std::shared_ptr (And std::weak_ptr)
      • Move Semantics, Rvalue References
      • Perfect Forwarding
      • Multithreading, C++ Memory Model
      • std::array
      • std::any, std::variant, std::optional
        • A Better void*: std::any
        • New-Style Union: std::variant
      • std::chrono
      • std::filesystem
      • Formatting Library (std::format(), std::print())
      • std::span
      • Explicit Object Member Functions (A.k.a Deducing this)
      • The Spaceship Operator <=> (And Comparison In General)
      • Concepts
      • Ranges And Views
      • Coroutines
      • Modules
      • Drafts
      • Exercises
      • From Concrete To Polymorphic (class Sensor)
      • Polymorphic “Classes” In Good Ol’ C
    • Design Patterns With C++
    • C++: TODO List
    • C++: Miscellaneous Live-Hacking
    • C++ Code
    • C++ Exercises
    • CMake
    • Is Software A Craft? Software Is A Craft! ⟶ Clean Code
    • Unit Testing With googletest
  • Training Courses
  • Complete Slide Material
  • C++ >= 11
  • std::any, std::variant, std::optional

std::any, std::variant, std::optional#

  • Topics

Topics#

  • A Better void*: std::any
  • New-Style Union: std::variant
On this page
  • Topics

© Copyright 2019-2025 (GPLv3), Jörg Faschingbauer.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.

Show Source