Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Type-Safe Interfaces with Modern C++
Rating: 4.6 out of 5(16 ratings)
160 students

Type-Safe Interfaces with Modern C++

Master the art of development with Modern C++ type system
Last updated 11/2019
English

What you'll learn

  • Use type system to your advantage
  • Create safe, rich and expressive interfaces
  • Use Pattern matching to implement metaprogramming
  • Real world scenarios to tackle programming tasks

Course content

4 sections18 lectures2h 17m total length
  • The Course Overview2:52

    This video provides an overview of the entire course.

  • Understanding Variants5:43

    Understand what a “variant” is and its usefulness.

    • `struct` ? `enum class` ? `variant` progression
    • Product and sum types
    • Variants versus unions
  • std::variant – Basic Interface8:42

    Learn about the basic interface of the new C++17 std::variant class.

    • Learn Construction and solve an assignment
    • Understand checking an active alternative
    • Explore accessing an active alternative
  • std::variant – Visitation8:07

    Understand what “visitation” is and how it can be applied to variants.

    • Learn the definition of visitations
    • std::visit with struct and generic lambda
    • Understand the shortcomings of std::visit
  • std::variant – Use Cases16:57

    Learn about realistic use case scenarios where std::variant can be used effectively.

    • Learn type-safe error handling
    • Understand state machines
    • Explore recursive data structures
  • std::variant – Recap4:29

    Section recap.

    • What a variant represents
    • std::variant interface and usage
    • Example of use cases

Requirements

  • C++, C++11/14 and master Modern C++17 utilities and techniques

Description

In this course we’ll learn how to write correct, safe, and performant code by making use of C++’s type system. Firstly, we’ll learn about the Standard Library’s “algebraic data types” and how they can increase safety, performance, and readability of your application/library. We’ll then look at function interfaces. As an example, writing a function that takes a string in such a way that it performs optimally with both std::string and const char* seems like a daunting task. It gets even more tricky with functions taking other functions as input. Is it possible to generalize these issues and provide the “perfect” interface?

About the Author :

Vittorio Romeo is a Software Engineer at Bloomberg LP. He completed his Bachelor's degree in Computer Science at "Università degli Studi di Messina".

He began programming at a very young age and is now a C++ enthusiast. While following the evolution of the C++ standard and embracing the newest features, he worked on several open-source projects, including modern general-purpose libraries and free cross-platform games.

Vittorio is an active member of the C++ community: he participated as a speaker at CppCon 2014/2015/2016, ++it Florence 2015 and at his local Linux Day 2013/2014 events, as a Student/Volunteer at C++Now 2015/2016, at Meeting C++ 2015/2016.

He currently maintains a C++-related blog and a YouTube channel featuring well-received modern C++11 and C++14 tutorials.

When he's not writing code, Vittorio enjoys weightlifting and fitness-related activities, competitive/challenging computer gaming and good sci-fi movies/TV-series.

Who this course is for:

  • Intermediate C++ developers familiar with C++11/14 aiming to discover and master Modern C++17 utilities and techniques.