Loading…
CppNorth2022 has ended
CppNorth, The Canadian C++ Conference, July 17-20, 2022,
The Omni King Edward Hotel, Toronto, Ontario M5C 1 E9
Metaprogramming [clear filter]
Monday, July 18
 

15:15 EDT

Binary Object Serialization with Structure Traversal & Reconstruction
I will present a minimally intrusive technique for extending a class to do data serialization in a binary format. When storing, it can deduce the data types using Template Argument Deduction (TAD).

When loading it uses a homebrew reflection technique for dynamic object creation. Reflection as a language feature will be unavailable until C++26. This serialization technique can dynamically recreate a persisted complex data structure/structure network. This is a platform agnostic technique. Not everybody is yet able to migrate to C++20, so this using C++14 compliant std::enable_if<>. We will also explorer optimizations for C++17 and what it takes to convert this technique to use C++20 concepts.

This trying is an exploration of multiple ideas that you might be able to apply to your code. It is not a talk trying to sell you on the use of this library. Serialization is just one application.

Speakers
avatar for Chris Ryan

Chris Ryan

Speaker Liaison, CppCon
Chris Ryan was classically trained in both software and hardware engineering. He is well experienced in Modern C++ on extremely large/complex problem spaces and Classic ‘C’ on Embedded/Firmware devices (large & small). Chris has no interest in C#/.,Net, Java, js or any web-ish... Read More →


Monday July 18, 2022 15:15 - 16:15 EDT
C - Kensington

16:45 EDT

Resolving Template MetaProgramming challenges using Type_expr
Template MetaProgramming (TMP) is an arcane part of C++ that the library Type_Expr attempt to simplify. I will show some problems with other library and explain the basic on how to read the code, and after that it become a series of challenge that we will resolve on compiler explorer.

The crux of the presentation will resolve around a sorted tuple by type size.

The attendee will learn useful tricks to debug and develop template-based code.

Speakers
avatar for Rémi Drolet

Rémi Drolet

C++ Enthousiast


Monday July 18, 2022 16:45 - 17:45 EDT
C - Kensington
 
Tuesday, July 19
 

11:00 EDT

Taking Static Type-safety to the Next Level
This talk will present a full-blown solution for a problem that has not been solved in C++ before: How can physical unit types (think Meters, Seconds, ...) be used inside vector / matrix types from a linear algebra library where each entry can have a different unit? The presented solution uses C++'s strong type system to provide physical unit annotations for each matrix element. Furthermore, it also enables coordinate frame and quantity kind annotations (think X- and Y-position in coordinate frame A or B which have identical units but refer to different things).

We will learn what is the best way to represent these annotations, how they propagate through linear algebra operations, how they determine the subset of valid operations on each type and of course and most importantly, how this can be implemented efficiently in C++ (with a special on how C++20 is a game-changer here). While developing the solution, we will also understand how this leads to code that is more expressive and less likely to contain errors because the majority of bugs can be caught at compile-time.

Applications that benefit from this include robotics, computer graphics, automated driving and any other domain that works with physical units, different coordinate frames and matrix operations.

Speakers
avatar for Daniel Withopf

Daniel Withopf

Daniel Withopf has been working on solving real-world problems with C++ in robotics and related fields for over 20 years. He currently is a Software Engineer at the German car supplier Bosch where he wrote and maintains an object tracking framework for self-driving car projects. While... Read More →


Tuesday July 19, 2022 11:00 - 12:00 EDT
C - Kensington

15:15 EDT

How to "OO" in C++
C++ has many ways to implement polymorphism: Inheritance and virtual functions, static polymorphism, concept-based polymorphism, the visitor pattern, variants and overloaded, etc. While this is very powerful, it can also be very confusing (after all, many languages are "one size fits all"). In this talk, I will explain and demonstrate each approach, including how to use it and why it exists, and then provide a framework for deciding which one to use in your code. I will also explain why "OO" is in quotation marks.

Speakers
avatar for Mike Spertus

Mike Spertus

Mike is a Senior Principal Engineer in AWS Dev Tools, and an Adjunct Professor at the University of Chicago. He has been involved with the C and C++ family of languages since the mid eighties, when he helped write one of the first MS-DOS C compilers, and is a long-time member of the... Read More →


Tuesday July 19, 2022 15:15 - 16:15 EDT
B - Knightsbridge
 
Filter sessions
Apply filters to sessions.