Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Rust Traits in C++ - How to Get the Benefits of Rust Traits for Runtime Polymorphism in C++

cpponsea via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Explore how to implement Rust's trait system in C++ through this 58-minute conference talk from C++ on Sea 2025. Learn about the limitations of traditional C++ runtime polymorphism using inheritance and virtual overrides, including their intrusive nature and inadequate performance in many scenarios. Discover how Rust traits offer a superior approach to runtime polymorphism and how C++'s expressive nature allows you to incorporate this central Rust feature with optimal performance that may even exceed both C++'s normal mechanisms and Rust's native implementation. Follow a step-by-step transformation process starting with C++ and a type erasure library to create the functional equivalent of Rust traits. Gain insights from Eduardo Madrid, a generic programming practitioner with extensive experience as a team leader and tech leader at automated trading firms and consulting, and author of the zoo libraries including Type Erasure and SWAR.

Syllabus

Rust Traits In C++ - Eduardo Madrid - C++ on Sea 2025

Taught by

cpponsea

Reviews

Start your review of Rust Traits in C++ - How to Get the Benefits of Rust Traits for Runtime Polymorphism in C++

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.