News

Contribute your insights about C++ community – Developer Ecosystem 2021 survey

Every year we run an extensive survey on the IT communities all over the world. And we do share then results and the raw data with the community for free.

Contribute your insights about C++ to the coding community! Take the Developer Ecosystem 2021 survey. You can receive personalized survey results and you’ll have the chance to win an incredible prize.

Help us to gather insights about trends in the C++ community. Participate in the survey run by JetBrains and you’ll have the chance to win a prize! In addition, you can receive personalized survey results to compare yourself with other developers.

Fill it the survey!

A Recap on string_view--Jonathan Boccara

Back to the basics.

A Recap on string_view

by Jonathan Boccara

From the article:

The string capabilities of C++ have little evolved since C++98, until C++17 brought a major evolution: std::string_view.

Let’s look at what string_view is about and what it can bring to your code, by making it more expressive and making it run faster...

Complete C++20 Modules Support with GCC--Boris Kolpackov

More of c++20 ready to be used.

Complete C++20 Modules Support with GCC

by Boris Kolpackov

From the article:

build2 now provides conforming and scalable support for all the major C++20 Modules features when used with GCC. This includes named modules, module partitions (both interface and implementation), header unit importation, and include translation. All of these features are also supported in libraries, including consumption of installed libraries with information about modules and importable headers conveyed in pkg-config files. As part of this effort we have also created a collection of examples that demonstrate C++20 Modules features that impact the build process...

Take control of your vcpkg dependencies with versioning support--Victor Romero

A new feature.

Take control of your vcpkg dependencies with versioning support

by Victor Romero

From the article:

We have an exciting new feature to announce in vcpkg: the long-awaited and highly requested package versioning! This feature makes it possible to install specific versions of dependencies and control installed versions over time. In order to use this feature, a vcpkg.json manifest file must be present in your repo to declare dependencies. Versioning is not currently available for libraries installed via the command line (i.e. vcpkg install library_name commands). The versioning feature is completely optional – you can choose not to specify library versions, and vcpkg will pick the most appropriate set of compatible versions for your dependencies from its baseline catalog. For now, we are considering this feature experimental. Please give us your feedback and let us know how we can improve...

Introduction to GPU Programming with CUDA and Thrust -- Richard Thomson

Utah C++ Programmers has released a new video from their February meeting.

Introduction to GPU Programming with CUDA and Thrust

by Richard Thomson

From the video description:

High-performance computing is now dominated by general-purpose graphics processing unit (GPGPU) oriented computations. How can we leverage our knowledge of C++ to program the GPU?

NVIDIA's answer to general-purpose computing on the GPU is CUDA. CUDA programs are essentially C++ programs, but have some differences. CUDA comes as a Toolkit SDK containing a number of libraries that exploit the resources of the GPU: fast Fourier transforms, machine learning training and inference, etc. Thrust is a C++ template library for CUDA.

In this month's meeting, Richard Thomson will present a brief introduction to CUDA with the Thrust library to program the GPU.

Programming the GPU with CUDA is a huge topic covered by lots of libraries, tutorials, videos, and so-on, so we will only be able to present an introduction to the topic. You are encouraged to explore more on your own!

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

Preconditions, Postconditions, Invariants - How They Help Write Robust Programs

An introduction to preconditions, postconditions and invariants.

Preconditions, Postconditions, Invariants –- How They Help Write Robust Programs

by Andrzej Krzemieński

From the video description:

Preconditions, postconditions, and invariants are part of what is often called Design by Contract, or Contract Programming. Even if you haven't heard of them, you are probably using them already. In this talk, we are going to see what they are, and how people and tools can make use of them.

unique_ptr, shared_ptr, weak_ptr, or reference_wrapper for class relationships -- Hitesh Kumar

Expressing class relationships with unique_ptr, shared_ptr, weak_ptr, and reference_wrapper.

unique_ptr, shared_ptr, weak_ptr, or reference_wrapper for class relationships

by Hitesh Kumar

From the article:

Classes communicate with each other by having handles as members that refer to other classes. The choice of those referring-handles (e.g., pointers or references) is mostly driven by ownership or control-over-lifetime semantics.

Modern C++: Safety and Expressiveness with override and final

Back to basics.

Modern C++: Safety and Expressiveness with override and final

by Bartlomiej Filipek

From the article:

While C++11 is with us for a decade now, it’s good to go back and recall some of its best features. Today I’d like to consider override and final keywords which add a crucial safety when you build class hierarchies with lots of virtual member functions.

See how to prevent common bugs, and how to leverage tools to make your code safer...

An Improved Thread with C++20--Rainer Grimm

More about c++20.

An Improved Thread with C++20

by Rainer Grimm

From the article:

std::jthread stands for joining thread. In addition to std::thread (C++11), std::jthread automatically joins in its destructor and can cooperatively be interrupted. Read in this post to know why std::jthread should be your first choice...

Colony – A brief history of timing--Matt Bentley

A different container.

Colony – A brief history of timing

by Matt Bentley

From the article:

Back in 2014 I began designing a game engine. Experienced programmers and curmudgeonly lecturers will tell you that if you make a game engine, you’ll never make a game – which is true, but sort of irrelevant. You will learn so much from making a game engine, you probably won’t care about the game by the end of it. The main reason I wanted to develop a game engine was that I was tired of seeing very basic 2D games with incredibly bad performance even on fast computers. If we got 15 frames-per-second on Intel 386 processors in the 1990s, why was it so hard for modern 2D games to achieve the same speed on exponentially-better hardware?