Articles & Books

Meeting C++ Blogroll now available as a weekly newsletter

Since more then 5 years the Meeting C++ Blogroll exists on meetingcpp.com, now its also available as a weekly newsletter!

Meeting C++ Blogroll now available as a weekly newsletter

by Jens Weller

From the article

You can now subscribe to the blogroll as a weekly newsletter, and receive every friday what has been posted on blogs and videos about C++ directly from Meeting C++ by email! If you already have an Meeting C++ Account, you can subscribe via the profile edit page.

Ordering by constraints--Andrzej Krzemieński

Moving to C++20!

Ordering by constraints

by Andrzej Krzemieński

From the article:

In the previous post we have seen how constraint conjunction and disjunction works, and how a function template with constraints is a better match than a function template without constraints (provided that the constraints are satisfied) when determining the best overload. We have also mentioned that selecting a better match from two constrained templates is possible, but not obvious. In this post we will expand on this, and show how constraint conjunction and disjunction as well as concepts play an important role in ordering function overloads and class template specializations based solely on constraints. This is one of the situations where language concepts show their special properties...

Nifty Fold Expression Tricks--Jonathan Müller

Many things can be done!

Nifty Fold Expression Tricks

by Jonathan Müller

From the article:

Suppose you need to have a variadic function and want to add all arguments together. Before C++17, you need two pseudo-recursive functions:

template <typename H, typename ... T>
auto add(H head, T... tail)
{
    return head + add(tail...);
}

template <typename H>
auto add(H head)
{
    return head;
}

However, C++17 added fold expressions, making it a one-liner:

template <typename H, typename ... T>
auto add(H head, T... tail)
{
    return (head + ... + tail);
    // expands to: head + tail[0] + tail[1] + ...
}

If we’re willing to abuse operator evaluation rules and fold expressions, we can do a lot more. This blog posts collects useful tricks...

The benefits and challenges of online live training -- Mateusz Pusz

Read about the benefits and challenges of online live training:

The benefits and challenges of online live training

by Mateusz Pusz

From the article:

Last week Jason Turner, Nicolai Josuttis, Rainer Grimm, Klaus Iglberger, and Mateusz Pusz met with the hosts of cpp.chat to talk about why training is valuable and to explain the particular challenges of such a profession in the days of social distancing.

Among others, C++ trainers discussed the benefits and issues with delivering the trainings and workshops in the online form. It turns out that online live training does not have to be a worse experience than participating in the face-to-face one. Read more...