Italian C++ Conference 2021 Call for sessions

The Italian C++ Conference 2021 is now putting together its program, and they want you to speak on C++. If you have something to share, check out their

Call for Sessions

by Marco Arena

About the conference:

The Italian C++ Conference 2021 will be online on June 19 and will host live sessions and networking on Remo.

The Italian C++ Conference is the biggest and most successful event organized by the Italian C++ Community and it is an environment where professionals, companies and students meet to share experience about C++ development and practices.

Since the first edition back in 2016, the conference has hosted amazing speakers like Andrei Alexandrescu, Walter Brown, Michael Wong, James McNellis, Bartosz Milewski, Ivan Čukić, Jens Weller, Phil Nash, Anastasia Kazakova, Peter Sommerlad, Rainer Grimm, Marc Goodner, Vittorio Romeo, and many more.

The Italian C++ Conference is put on by the Italian C++ Community and is open to anyone who wishes to be there either as a presenter or an attender.

The event will be free to attend.

The Call for Sessions will close on April 11 at 23:59 CET.

C++20 by Rainer Grimm [Leanpub PDF/iPad/Kindle]

Will you read it?

C++20

by Rainer Grimm

From the article:

My book C++20 is both: a tutorial and a reference for the C++20 standard. It teaches you C++20 and provides you with the details of this new thrilling C++ standard. The thrilling factor is mainly due to the big four of C++20...

CopperSpice: Mutex + Lock = CsLibGuarded

New video on the CopperSpice YouTube Channel:

Mutex + Lock = CsLibGuarded

by Barbara Geller and Ansel Sermersheim

About the video:

Our newest C++ video looks at a better way to lock a mutex. We look at making the data part of the solution. The video walks through several variations of an example to explain why the data, mutex, and lock should be tied together and the benefits that result from this change.

Please take a look and remember to subscribe!

Introduction to OpenCV with VcPkg and CMake -- Richard Thomson

Utah C++ Programmers has released a new video.

Introduction to OpenCV with VcPkg and CMake

by Richard Thomson

From the video description:

OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library.

This month, Richard Thomson will give us an introduction to OpenCV and walk us through some examples of using the library. OpenCV is a large library, so not every detail can be presented at once. However, we'll try to get a feel for what it looks like to use components from the library and perform some simple image manipulation tasks.

YouTube: https://www.youtube.com/watch?v=e7GtcsSJ51s

Don't automatically use auto parameters in C++ -- Lesley Lai

Should we use almost always auto parameters?

Don't automatically use auto parameters in C++

by Lesley Lai

From the article:

Since C++14, we can create lambda expressions that take auto parameters. C++20 generalizes this idea by allowing us to do the same thing for regular functions. With this feature's advent, the programming style where all parameters are auto becomes popular among some C++ programmers. However, I think we should not use it if we had to. The more specific the type of the parameter is, the better.

Example of How New Diagnostics Appear in PVS-Studio

Users sometimes ask how new diagnostics appear in the PVS-Studio static analyzer. We answer that we draw inspiration from a variety of sources: books, coding standards, our own mistakes, our users' emails, and others. Recently we came up with an interesting idea of a new diagnostic.

Example of How New Diagnostics Appear in PVS-Studio

by Andrey Karpov

From the article:

As for application software development, it doesn't make sense to enable them. The CovidSim project could do without them. Otherwise, a user will simply drown in a huge number of messages that are of little use in this case. For example, when experimenting with this set of diagnostics, we received more than a million warnings for some medium-sized open projects. Roughly speaking, every third line of code might be faulty in the view of MISRA. No one will scrape through all warnings, much less fix them. The project is either developed immediately taking into account MISRA recommendations, or this coding standard is irrelevant for it.
 

How C++ Resolves a Function Call--Jeff Preshing

Know everything about it.

How C++ Resolves a Function Call

by Jeff Preshing

from the article:

C is a simple language. You’re only allowed to have one function with each name. C++, on the other hand, gives you much more flexibility:

  • You can have multiple functions with the same name (overloading).
  • You can overload built-in operators like + and ==.
  • You can write function templates.
  • Namespaces help you avoid naming conflicts.

I like these C++ features. With these features, you can make str1 + str2 return the concatenation of two strings. You can have a pair of 2D points, and another pair of 3D points, and overload dot(a, b) to work with either type. You can have a bunch of array-like classes and write a single sort function template that works with all of them.

But when you take advantage of these features, it’s easy to push things too far. At some point, the compiler might unexpectedly reject your code with errors like:

error C2666: 'String::operator ==': 2 overloads have similar conversions
note: could be 'bool String::operator ==(const String &) const'
note: or       'built-in C++ operator==(const char *, const char *)'
note: while trying to match the argument list '(const String, const char *)'

Like many C++ programmers, I’ve struggled with such errors throughout my career. Each time it happened, I would usually scratch my head, search online for a better understanding, then change the code until it compiled. But more recently, while developing a new runtime library for Plywood, I was thwarted by such errors over and over again. It became clear that despite all my previous experience with C++, something was missing from my understanding and I didn’t know what it was.

Fortunately, it’s now 2021 and information about C++ is more comprehensive than ever. Thanks especially to cppreference.com, I now know what was missing from my understanding: a clear picture of the hidden algorithm that runs for every function call at compile time.