Looking for technical training for your team? Get in touch so we can help.

Expectify - Rich Polymorphic Error Handling with llvm::Expected<T­>

September 19, 19:00

Berlin, Germany
c-base, Rungestraße 20, Berlin

External Registration

Open Registration Page

Hello C++-fans Berlin,
after several months of silence I'm happy to finally announce our next C++ Meetup!
For our September meetup Stefan Gränitz will be talking about rich polymorphic error handling with llvm::Expected as an alternative to exceptions.
As usual we'll meet at 19:00h for socializing and the talk starts at 20:00h.

There are good reasons for and against the use of C++ Exceptions. The lack of good alternatives, however, is often considered a strong argument FOR them. Exception-free codebases just too easily retrogress to archaic error code passing. If your project doesn't go well with Exceptions, it can be a terrible trade-off.
This talk wants to tackle the issue, presenting a solution that was introduced to the LLVM libraries recently. It provides rich polymorphic handling for recoverable errors in an Exception-free codebase. After a short introduction to its primitives and syntax, we will review a number of benchmarks to get an idea of performance and binary size overhead compared to error codes and exceptions.
The last part of the presentation shows an experimental (and hopefully interesting) approach for generic error path testing using the presented infrastructure: https://github.com/weliveindetail/ForceAllErrors-in-LLVM
For all those who want to use llvm::Expected but don't want to pull in the whole of LLVM, I provide a stripped-down version on GitHub: https://github.com/weliveindetail/llvm-expected
Looking forward to see all of you, get feedback and prompt interesting discussions.

Die Berlin C++ Meetup Gruppe Die Berlin C++ Meetup Gruppe

Propose talk to Die Berlin C++ Meetup Gruppe