C++ On Sea: Standard pricing is ending soon

The new C++ On Sea conference is starting soon.

Standard pricing is ending soon

by C++ on Sea

About the article:

With the conference less than two weeks away tickets are still selling well - bearing out the prediction that a lot of people leave it until quite late!

What you might not know is that the standard, two-day, ticket pricing was set to end on the 21st January! After that "Last Minute" tickets can still be bought, but at a slightly higher price.

Stop reimplementing the virtual table and start using double dispatch

AndyG wants us to stop misusing dynamic_cast and start using a visitor pattern

Stop reimplementing the virtual table and start using double dispatch

by AndyG

From the article:

In this tutorial, I’ll talk about one solution to this problem I’ve had some success with: the double-dispatch Visitor pattern. With it, you can trim down those long if-else if blocks, separate responsibility into manageable pieces, and even stabilize your interface better.

CppCast Episode 183: [Boost] DI and SML with Kris Jusiak

Episode 183 of CppCast the first podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Kris Jusiak to discuss [Boost].DI and [Boost].SML libraries.

CppCast Episode 183: [Boost] DI and SML with Kris Jusiak

by Rob Irving and Jason Turner

About the interviewee:

Kris is a C++ Software Engineer who currently lives a couple of doors down from CppCon 2019. He has worked in different industries over the years including telecommunications, games and most recently finance for Quantlab Financial. He has an interest in modern C++ development with a focus on performance and quality. He is an open source enthusiast with multiple open source libraries where he uses template metaprogramming techniques to support the C++ rule - "Don't pay for what you don't use" whilst trying to be as declarative as possible with a help of domain-specific languages. Kris is also a keen advocate of extreme programming techniques, test/behaviour driven development and truly believes that 'the only way to go fast is to go well!'.

CopperSpice: Inheritance

New video on the CopperSpice YouTube Channel:

Inheritance

by Barbara Geller and Ansel Sermersheim

About the video:

In this video, we look at the full variety of inheritance mechanisms that C++ provides. The C++ object model allows several different types of inheritance relationships, both single and multiple, as well as support for composition. Some of the terminology around these inheritance relationships can be quite confusing, and we present some best practices for avoiding miscommunication and misunderstandings. We address questions of how these features interact and why you would choose one type of inheritance over another.

Please take a look and remember to subscribe!

Exploring C++20 - Class Types in Non-Type Template Parameters--Tobias Widlund

Exciting!

Exploring C++20 - Class Types in Non-Type Template Parameters

by Tobias Widlund

From the article:

If I had to pick out my favourite features planned for C++20, then this one would definitely be amongst the top 5 since I love compile time programming. This feature makes it more natural to write templated code since it allows you to group data together and pass it to a template without having to resort to hacks.

To explain what this feature is about, I will start by talking about normal non-type template parameters from pre-C++20...

The pImpl Idiom--Arne Mertz

In one word.

The pImpl Idiom

by Arne Mertz

From the article:

The pImpl idiom is a useful idiom in C++ to reduce compile-time dependencies. Here is a quick overview of what to keep in mind when we implement and use it...

Don’t pass lambdas (or other multi-line entities) as parameters to macros--Raymond Chen

Not helping you.

Don’t pass lambdas (or other multi-line entities) as parameters to macros

by Raymond Chen

From the article:

Consider this macro:

#ifdef DEBUG
#define LOG(value) LogValue(value)
#else
// In production, evaluate but don't log.
#define LOG(value) (value)
#endif

This seems not entirely unreasonable, but bad things happen if you pass a multi-line entity as the macro parameter...

Move smart pointers in and out functions in modern C++

Different options with different meanings.

Move smart pointers in and out functions in modern C++

by Triangles @ Internal Pointers

From the article:

Passing and returning smart pointers to/from functions are operations that require some planning. There are many ways of doing it and picking the right one is not always straightforward. Luckily for us C++ experts have guidelines that shed some light on this task.

Modern dining philosophers -- Lucian Radu Teodorescu

How to solve the dining philosophers problem in 2018? By using tasks. And how to use tasks? Read on...

Modern dining philosophers

by Lucian Radu Teodorescu

From the article:

We give several solutions to the dining philosophers problem, each with some pros and cons. But, more importantly, we walk the reader through the most important aspects of using tasks to solve concurrency problems.

Instead of reaching for our higher-level frameworks, we opted to keep the level of abstractions as close as possible to raw tasks. This way, we hope to guide the reader to understand more about the essence of task-based programming. Our aim is to make the reader comprehend the machinery of composing tasks; those skills should be highly valuable.