Video & On-Demand

CppCast Episode 161: Expectations and Exceptions with Simon Brand

Episode 161 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Simon Brand to discuss his upcoming CppCon talks covering exceptions, value wrappers, debuggers and more.

CppCast Episode 161: Expectations and Exceptions with Simon Brand

by Rob Irving and Jason Turner

About the interviewee:

Simon is a GPGPU toolchain developer at Codeplay Software in Edinburgh. He turns into a metaprogramming fiend every full moon, when he can be found bringing compilers to their knees with template errors and debating undefined behaviour on the C++ Slack channel. He co-organises the Edinburgh C++ user group and contributes to various programming standards bodies.

Outside of programming, he enjoys experimental films, homebrewing, and board games.

CppCon 2017: How to Write Effective Documentation for C++ Libraries...--Robert Ramey

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

How to Write Effective Documentation for C++ Libraries...

by Robert Ramey

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

With the success of GitHub, everybody and his brother is a library developer. Programmers love to create code, upload it to GitHub and hope for immortality. Most projects get only the most cursory examination before being passed over by users. Why is that? GitHub considered the problem.

GitHub just published its 2017 Open Source Survey. The popular social coding service surveyed over 5,500 members of its community, from over 3,800 projects on github.com. It also spoke to 500 coders working on projects from outside the GitHub ecosystem. The Open Source Survey asked a broad array of questions. One that caught my eye was about problems people encounter when working with, or contributing to, open source projects. An incredible 93 percent of people reported being frustrated with “incomplete or confusing documentation”. see https://thenextweb.com/dd/2017/06/02/...

Even the most experienced and dedicated software developers can't do it. This can be confirmed by looking over recent reviews of Boost libraries. The most common complaint is that the documentation isn't useable.

Programmers love their stuff and hope to get people to use it, why don't they fix their documentation? The reason is simple: They don't know how.

Problems

a) It's tedious and boring to write
b) Developers don't know what to include and what to exclude
c) Tools make things harder
d) Regardless of the amount of effort invested, the end result is usually of little or no value.

This presentation will present a "Cookbook" and demonstration for creating documentation. Using this method will

a) Much diminish the tedium of the task.
b) Help improve to the quality of library design and implementation
c) Create something that is useful to the library user.

We will touch upon tools like Doxygen, etc. But this is only a small portion of the presentation. We use them so they deserve mention. But they don't cause the problem, and they don't solve it either.

CppCon 2017: How to Write a Custom Allocator--Bob Steagall

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

How to Write a Custom Allocator

by Bob Steagall

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

You'd like to improve the performance of your application with regard to memory management, and you believe this can be accomplished by writing a custom allocator. But where do you start? Modern C++ brings many improvements to the standard allocator model, but with those improvements come several issues that must be addressed when designing a new allocator.

This talk will provide guidance on how to write custom allocators for the C++14/C++17 standard containers. It will cover the requirements specified by the standard, and will describe the facilities provided by the standard to support the new allocator model and allocator-aware containers. We'll look at the issues of allocator identity and propagation, and examine their implications for standard library users, standard library implementers, and custom allocator implementers. We'll see how a container uses its allocator, including when and how a container's allocator instance propagates. This will give us the necessary background to describe allocators that implement unusual semantics, such as a stateful allocator type whose instances compare non-equal. Finally, the talk will provide some guidelines for how to specify a custom allocator's public interface based on the semantics it provides.

CppCon 2017: CNL: A Compositional Numeric Library--John McFarlane

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

CNL: A Compositional Numeric Library

by John McFarlane

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

CNL is a numerics library born out of efforts to standardize fixed-point arithmetic.
It provides number types which increase precision, enforce correctness and maintain efficiency.
And by designing these types with composability in mind, the library aims to do for integers what the STL does for pointers.

This introductory talk will show potential users how they can benefit from using CNL in a wide variety of applications. Firstly, the individual components will be illustrated using straightforward examples. Then we'll see how these components slot together to produce powerful new types. Finally I'll detail the steps necessary to adapt existing types to work within the CNL framework.

Along the way, I hope to share some of the insights I've gained while learning about literal types including: why you shouldn't mess with `int` if you want zero-cost abstractions; how C++ is getting better at supporting new number types and my hopes for the forthcoming Numeric TS.

CppCon 2017: Building C++ Modules--Boris Kolpackov

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

Building C++ Modules

by Boris Kolpackov

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

C++ Modules TS is now implemented (to various degrees) by GCC, Clang, and MSVC. The aim of this talk is to provide practical information on the mechanics of creating and consuming modules with these compilers. It is based on our experience adding modules support to the build2 toolchain and then modularizing some of its components.

We start with a brief introduction to C++ modules, why we need them, and how they relate to other physical design mechanisms, namely headers, namespaces, and libraries.

Next we explore the kind of integration modules will require from a C++ build system. Specifically, when and where a module binary interface is built? How can a build system discover which modules are needed? What are the implications for parallel and distributed builds? Can we finally get rid of the preprocessor? And what happens to header-only libraries in this brave new modularized world?

With a firm understanding of the implications C++ modules have on the build process, we can try to answer some of the module design questions: What is an appropriate module granularity? Should we have separate module interface and implementation units? Can we have a dual header/module interface for legacy support? Are module-only libraries to become all the rage?

CppCon 2017: Programming with C++ Constraints: Background, Utility, and Gotchas--Walter E. Brown

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

Programming with C++ Constraints: Background, Utility, and Gotchas

by Walter E. Brown

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Compile-time constraints will likely soon become part of our routine C++ programming vocabulary. Why? Such constraints are induced by new core language features (requires-clauses and requires-expressions) that are on the horizon for C++. What are these all about?

Almost every function imposes requirements on its users; violating those requirements typically leads to incorrect programs. Historically, such requirements had to be expressed in comments or other documentation, as there was little machinery to express them in code. Soon we will be able to express more requirements in code, thus allowing compilers to detect and address more violations.

This talk aims to prepare both new and veteran C++ programmers with the necessary background, tutorial information, and advice to exploit this powerful new supplement to function declarations. A case study, illustrating an unexpected gotcha, will conclude the presentation.

C++ Weekly Episode 125: The Optimal Way To Return From A Function—Jason Turner

Episode 125 of C++ Weekly.

The Optimal Way To Return From A Function

by Jason Turner

About the show:

In this episode of C++ Weekly Jason investigates the possible methods that one of two string values might be returned from a function. Which option is best? Which option can the compiler optimize the most? Do we take one return path or multiple return paths? Should a ternary be used?

CppCast Episode 159: Design Patterns in Modern C++ with Dmitri Nesteruk

Episode 159 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Dmitri Nesteruk to discuss Design Patterns with Modern C++.

CppCast Episode 159: Design Patterns in Modern C++ with Dmitri Nesteruk

by Rob Irving and Jason Turner

About the interviewee:

Dmitri Nesteruk is a quantitative analyst, developer, course and book author, and an occasional conference speaker. His interests lie in software development and integration practices in the areas of computation, quantitative finance and algorithmic trading. His technological interests include C# and C++ programming as well high-performance computing using technologies such as CUDA and FPGAs.

CppCon 2017: Undefined Behaviour is awesome!--Piotr Padlewski

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

Undefined Behaviour is awesome!

by Piotr Padlewski

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Undefined behavior (UB) is one of the features of C++ that is both loved and hated. Every C++ developer cares about performance, which is why it is very important to understand what the compiler can optimize and what are the language guarantees. Many times programmers are too optimistic about what the compiler can optimize, or they waste time optimizing code by hand.

In this talk you will learn:
- what is the “as-if” rule
- why compilers know less than the programmer — the main problem with Translation Units
- why compilers optimize based on UB, but don't warn about it
- why Undefined Behavior can transcend time, removing your whole code without running 88mph
- why having a more constrained language is better — optimizations that you can’t do in C

CppCon 2017: Seventeenification: Porting sqlpp11 to C++17--Roland Bock

Have you registered for CppCon 2018 in September? Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

Seventeenification: Porting sqlpp11 to C++17

by Roland Bock

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

The ink on C++17 has merely dried, but the major compilers support most features already. It's high time for a reality check!

This talk is a report about the ongoing effort of porting sqlpp11 to C++17. I'll show real-world usage of the following features:

Core:
inline variables
auto non-type template parameters
[[nodiscard]]
class template deduction
constexpr if
fold expressions

Library:
string_view
optional

This talk also comes with a realization about C++11.