basics

Lightning Talks from Meeting C++ 2019 are now online!

The lightning talks from Meeting C++ 2019 are now online!

Meeting C++ Youtube Channel

by Jens Weller

From the article:

A few lightning talks I'd like to point to:

Finding hard to find bugs with Address Sanitizer - Marshall Clow

Consistently Inconsistent - Conor Hoekstra

Why don't the cool kids like OOP? - Jon Kalb

How to initialize x from expression y - Howard Hinnant

5 Ways Using Braces Can Make Your C++ Code More Expressive--Jonathan Boccara

The power of the brace.

5 Ways Using Braces Can Make Your C++ Code More Expressive

by Jonathan Boccara

From the article:

A lot of languages use braces to structure code. But in C++, braces are much more than mortar for holding blocks of code together. In C++, braces have meaning.

Or more exactly, braces have several meanings. Here are 5 simple ways you can benefit from them to make your code more expressive...

Highlighting the Student and Support Tickets for Meeting C++ 2019

Also available in this year: the programs for students and diversity & support for Meeting C++ 2019

Highlighting the Student and Support Tickets for Meeting C++ 2019

by Jens Weller

From the article:

With the Schedule for Meeting C++ 2019 being complete regarding submitted talks, I want to highlight, that there is an opportunity for folks to attend the conference with a free ticket!

Quick Q: Removing item from vector, while in C++11 range 'for' loop?

Quick A: it is not possible

Recently on SO:

Removing item from vector, while in C++11 range 'for' loop?

No, you can't. Range-based for is for when you need to access each element of a container once.

You should use the normal for loop or one of its cousins if you need to modify the container as you go along, access an element more than once, or otherwise iterate in a non-linear fashion through the container.

For example:

auto i = std::begin(inv);

while (i != std::end(inv)) {
    // Do some stuff
    if (blah)
        i = inv.erase(i);
    else
        ++i;
}