Articles & Books

C++ 20 Concepts

Time to use them.

C++ 20 Concepts part 1 and part 2

by Gajendra Gulgulia

From the article:

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, i.e., in coherence with C++ templates design principles:

  • a generalized code
  • better code than hand written code with zero overhead
  • well specified interfaces on the template method/class usage.

C++ templates fell short on the last requirements but the first two requirements were good enough and templates few off with a huge success. In simpler terms the last requirement on concepts is about imposing constraints on the template parameters themselves, that a function or a class can accept.
In this article, I’ll give an introductory example of how concepts could be useful in terms of specifying the interface of a generic code, which amongh many advantages helps get rid of the verbose error message and achieve faster compilation, and consequently help make generic programming more expressive and fun. In the later long running series about concepts with gradually increasing complexity, I’ll present details as and when necessary. Lastly before beginning, I encourage all users to try out the code examples with a compiler that supports C++20 . So lets start with concepts of concepts wink

Upcoming C++ User Group meetings in November

The monthly listing of upcoming C++ User Group meetings at Meeting C++

Upcoming C++ User Group meetings in November

by Jens Weller

From the article:

The monthly overview on C++ User Group meetings being announced by the start of the month!

This month features 4 Events organized by Meeting C++:

    2.11 Meeting C++ online - What you can learn from being too cute: why you should write code
    4.11 Meeting Emedded 2021
    10.11 Meeting C++ 2021
    16.11 Meeting C++ online job fair

There is 1 new C++ User Groups: Odense.

 

How Meeting C++ can help you to close your C++ knowledge gap

Update your C++ skills with Meeting C++!

How Meeting C++ can help you to close your C++ knowledge gap

by Jens Weller

From the article

With 1.5 years of the pandemic behind us and one more "season" ahead for many of us, I'd like to show you how you can improve your C++ skills with the events organized by Meeting C++!

Meeting C++ organizes many online Events on Hubilo with its Meeting C++ online User Group. This started over a year ago and today it hosts 1 - 2 evenings of C++ content per month. Usually a talk or a fair like the online C++ job fair or the book & tool fair. The next meeting of this User Group is next week, hosting Daisy Hollmans CppCon Talk What you can learn from being too cute: why you should write code that you should never write.

Results and Statistics from the September Meeting C++ online job fair

A posting some insights and statistics from the last job fair.

Results and Statistics from the September Meeting C++ online job fair

by Jens Weller

From the article:

In September Meeting C++ online organized an online C++ Job fair, in this blog post I'm going to write about some of the lessons learned and a few new insights from the attendee data.

First, the next online job fair is mid November, book your table if you'd like to attend as an employer. Or become listed in the Meeting C++ employer listing for one year.

Design Patterns VS Design Principles: Observer, State and Strategy

Do you know about them?

Design Patterns VS Design Principles: Observer, State and Strategy

by Jonathan Boccara

From the article:

In this series of articles on design patterns and design principles, we analyse how the 23 GoF design patterns relate to the 9 GRASP design principles.

In a previous article, we classified the GRASP patterns like this (excluding “Managing complexity”).

The study we perform in this series is helpful to understand better both the GoF and the GRASP, with the goal of taking better decisions when it comes to organizing our code.

The GoF design patterns come from the seminal Design Patterns book. The GRASP design principles are explained in Craig Larman’s Applying UML and Patterns.

In this episode of the series, we examine the Observer, State and Strategy design patterns...

6 Ways to Refactor new/delete into unique ptr--Bartlomiej Filipek

Do you have that problem?

6 Ways to Refactor new/delete into unique ptr

by Bartlomiej Filipek

From the article:

In legacy code, you can often spot explicit new and delete lurking in various places and waiting to produce pointer-related issues. This blog post shows six patterns to improve that erroneous style and rely on modern techniques, especially unique_ptr and other helper standard types...

Automatic Return Type (C++98)--Rainer Grimm

The series continue.

Automatic Return Type (C++98)

by Rainer Grimm

From the article:

Depending on the used C++ standard, there are different ways to return the right return type of a function template. In this post, I start with traits (C++98), continue in my next post with C++11/14, and end with concepts (C++20)...