News

CppCon 2020 Breaking Dependencies: The SOLID Principles--Klaus Iglberger

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Breaking Dependencies: The SOLID Principles

by Klaus Iglberger

Summary of the talk:

SOLID is an abbreviation for five of the most important software design principles:
- (S)ingle Responsibility Principle
- (O)pen-Closed Principle
- (L)iskov Substitution Principle
- (I)nterface Segregation Principle
- (D)ependency Inversion Principle

For almost two decades, these principles have proven to be a valuable set of guidelines to cope with software dependencies. Although initially introduced as guidelines for object-oriented programming, they have become a universal set of guidelines that can be used equally well for procedural, functional or generic programming. In this talk I'll recap the SOLID principles and explain why they form such a valuable set of universal design guidelines. Also, I'll go into detail about several common misconceptions.

CppCon announces Academy classes (on-site and on-line training) -- Jon Kalb

cppcon-2021-academy.pngCppCon registration is open, and the Early Bird discount is available until July 31.

This just announced:

Announcing CppCon Academy 2021 Classes

by Jon Kalb

From the article:

Registration is open for almost twenty CppCon Academy classes that will be held in the days before or after CppCon 2021 in October.

Four classes are open to online attendees and the rest will be offered to onsite attendees at the Gaylord Rockies in Aurora.

This year we are offering classes that range from those that are focused on updating you to the latest versions of C++, to those focusing on better code, testing, or design skills. This year we are offering a class on computing in mixed CPU/GPU/FPGA environments and two on embedded programming. ...

Extended Aggregate Initialisation in C++17--Jonathan Boccara

Were you aware of the change?

Extended Aggregate Initialisation in C++17

by Jonathan Boccara

From the article:

By upgrading a compiler to C++17, a certain piece of code that looked reasonable stopped compiling.

This code doesn’t use any deprecated feature such as std::auto_ptr or std::bind1st that were removed in C++ 17, but it stopped compiling nonetheless.

Understanding this compile error will let us better understand a new feature of C++17: extended aggregate initialisation...

C++20 three way comparison operator — ensure backward compatibility: Part 8--Gajendra Gulgulia

The series continue.

C++20 three way comparison operator — ensure backward compatibility: Part 8

by Gajendra Gulgulia

From the article:

In part one till seven of the tutorial series, we looked at how to use the C++20’s three way comparison operator. In this part of the tutorial series, we’ll look at the compatibility issues when using objects that were constructed before C++20 with the three way comparison operator and how to resolve them...

CppCon 2019 Reducing Template Compilation Overhead, Using C++11, 14, 17, and 20--Jorg Brown

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Reducing Template Compilation Overhead, Using C++11, 14, 17, and 20

by Jorg Brown

Summary of the talk:

At their best, new C++ standards offer simpler, clearer, and faster-to-compile ways to write your code. But many information sources, for example Andrei Alexandrescu’s Modern C++ Design, haven’t been updated.

More importantly, template metaprogramming is not something we generally seek to optimize because a good compiler handles it well, and problems generally only show up in the form of long compile times.

In this presentation, I'll describe techniques you can use to simplify, clarify, and improve the compile speed, of your code, including:
* Using C++17 "if constexpr"
* Using C++11 variadic function / template arguments (often without needing recursion!)
* Using decltype on auto-return functions in order to compute types in a more readable way.
* Using C++20 constraints rather than std::enable_if

Why do smart pointers null out the wrapped pointer before destroying it?--Raymond Chen

Ever thought about it?

Why do smart pointers null out the wrapped pointer before destroying it?

by Raymond Chen

From the article:

When you null out a smart pointer type, the smart pointer type nulls out the old pointer before releasing it, rather than releasing the member and then setting it to null. Why does the old value get detached from the smart pointer before releasing it? Why not release it, and then set it to null?

CppCon 2020 2020: The Year of Sanitizers?--Victor Ciura

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

2020: The Year of Sanitizers?

by Victor Ciura

Summary of the talk:

Clang-tidy is the go-to assistant for most C++ programmers looking to improve their code, whether to modernize it or to find hidden bugs with its built-in checks. Static analysis is great, but you also get tons of false positives.

Now that you’re hooked on smart tools, you have to try dynamic/runtime analysis. After years of improvements and successes for Clang and GCC users, LLVM AddressSanitizer (ASan) is finally available on Windows, in the latest Visual Studio 2019 versions. Let's find out how this experience is for MSVC projects.

We’ll see how AddressSanitizer works behind the scenes (compiler and ASan runtime) and analyze the instrumentation impact, both in perf and memory footprint. We’ll examine a handful of examples diagnosed by ASan and see how easy it is to read memory snapshots in Visual Studio, to pinpoint the failure.

Want to unleash the memory vulnerability beast? Put your test units on steroids, by spinning fuzzing jobs with ASan in Azure, leveraging the power of the Cloud from the comfort of your Visual Studio IDE.

HPX V1.7.0 released -- STE||AR Group

The STE||AR Group has released V1.7.0 of HPX -- A C++ Standard library for parallelism and concurrency.

HPX V1.7.0 Released

The newest version of HPX (V1.7.0) is now available for download! This release continues the focus on C++20 conformance with multiple new algorithms adapted to be C++20 conformant and becoming customization point objects (CPOs). We’ve also added experimental support for using GCC’s SIMD data types with our parallel algorithms. Finally, we've implemented a large subset of sender/receiver functionality based on current proposals (mainly P0443, P1897, and P2300). HPX futures fulfill the sender concept, and senders can explicitly be turned into futures, which means that codebases can gradually adopt senders where appropriate. The full list of improvements, fixes, and breaking changes can be found in the release notes.

    HPX is a general purpose parallel C++ runtime system for applications of any scale. It implements all of the related facilities as defined by the C++ Standard. As of this writing, HPX provides one of the only widely available open-source implementation of the new C++17 parallel algorithms. Additionally, HPX implements functionalities proposed as part of the ongoing C++ standardization process, such as large parts of the features related parallelism and concurrency as specified by the upcoming C++20 Standard, the C++ Concurrency TS, Parallelism TS V2, data-parallel algorithms, executors, senders/receivers and many more. It also extends the existing C++ Standard APIs to the distributed case (e.g. compute clusters) and for heterogeneous systems (e.g. GPUs).

    HPX seamlessly enables a new Asynchronous C++ Standard Programming Model that tends to improve the parallel efficiency of our applications and helps reducing complexities usually associated with parallelism and concurrency.

 

C++20 three way comparison operator: Part 7--Gajendra Gulgulia

The series continue.

C++20 three way comparison operator: Part 7

by Gajendra Gulgulia

From the article:

In the fifth and sixth part of the tutorial series, I explained the comparison category std::strong_ordering and std::weak_ordering respectively with examples and use cases. In this part of the tutorial series, we take a closer look at the third and final comparison category, i.e. std::partial_ordering...