Concepts is one of the 4 major additions in C++20 standard. The idea of concepts has existed as long as C++ templates themselves but it has only been until few years that the foundation of C++ concepts have been laid out in the manner it had earlier been desired desired…

Compilere Explorer and Cmake

Introduction

Compiler explorer has been one of the most widely used online tool for compiling C++ code, doing experiment with C++ features, sharing code snippets with friends and colleagues and also (my favorite feature) to compare and prove with the help of assembly code why a certain way of coding might…

In this part of the issue, I’ll discuss about the new std::jthread that helps us avoid the boilerplate code for joining the conventional std::thread in the first section. In the end, I’ll also mention about the std::swap algorithm’s specialization introduced in C++20 to swap the underlying thread handles associated with…

Most of C++ developers who have been using concurrency features are well aware of the problems of std::ostream or std::cout with multi threading. The outputs are almost all the time undeterministic and worse they are always entangled with each other in ways which makes std::cout unusable in concurrent applications.

The Problem

Consider…

In this issue of the concepts tutorial, I’ll discuss in detail about abbreviated function template syntax , constraining auto with abbreviated function template syntax , constraining deduced return type, i.e. constraining the auto return type with concepts.

1. Abbreviated function template syntax in C++20

1.1 Introduction

With the introduction of concepts in C++20, generic program (and here function templates)…

Es ist jeden bekannt, dass das Concepts gehört zu einen der 4 neuen größen Merkmalen der C++20. Die Idee des Concepts ist genau so alt wie das Template-Metaprogramming selbst, weil, concepts hilft ein C++ entwickler dabei, das Template-Metaprogramming leichter und spannender zu machen. Als C++ Template-Metaprogramming in den 80-er Jahre…

Gajendra Gulgulia

I'm a backend software developer and from time to time I also like to explore web development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store