Skip to content
Variations on Variant

Details

On July 7th we have the pleasure to welcome Roi Barkan to our user group. A professional software developer and architect since 2000, Roi's main focus throughout his career was on high performance and distributed systems, implementing complex and innovative algorithms. Roi has been the VP technologies of Istra Research since 2014, where he helps creating low latency financial systems. Prior to working for Istra Research, Roi spent 12 years in software development, architecture and management in the IT Security field. Roi received his B.A in Computer Science with high honors from the Technion in Israel, and his executive MBA from Tel Aviv University.

---------------------------
Abstract: std::variant was added to C++ in 2017 as a type-safe alternative to C's union. To start us off, I will shortly introduce the rationale of std::variant and the typical ways in which it can be used. I will also try to give insights into the way std::variant is typically implemented, highlighting the memory layout and its run-time performance implications. The bulk of the talk will then focus on the key differences between std::variant and union, and discuss a common use-case where unions are typically used which std::variant does not support - serialization of streams of a trivially copyable object to files or to network. Then, I'll suggest approaches to tackle this shortcoming: Intrusive-Variant, Variant-of-Base. When presenting and describing the approaches above, I will dive deeper into what the C++ standard says about unions and their pitfalls, and discuss reasoning and issues. Time permitting, I'll finish off with a counterintuitive uses of std::variant - simple and safe mechanism for de-virtualization. After attending this talk, participants should be better equipped to use this relatively new concept to modernize existing low-level C style code and will have a better understanding of how variants work under the hood.

---------------------------
Schedule:
19:00 (CEST) -- Start of the videostream

Photo of MUC++ group
MUC++
See more events
Online event
This event has passed