Articles & Books

How to Retrieve the Firsts from a Collection of Pairs

Simple.

How to Retrieve the Firsts from a Collection of Pairs

by Jonathan Boccara

From the article:

When using the STL, there is a use case that pops up every now and then and that often causes more trouble than necessary: if we have a collection of pairs, like an std::vector of pairs, or simply a std::map, how can we retrieve the collection of the first elements of each item in the collection?

Exploring Clang Tooling Part 3: Rewriting Code with clang-tidy--Stephen Kelly

The series continue.

Exploring Clang Tooling Part 3: Rewriting Code with clang-tidy

by Stephen Kelly

From the article:

In the previous post in this series, we used clang-query to examine the Abstract Syntax Tree of a simple source code file. Using clang-query, we can prototype an AST Matcher which we can use in a clang-tidy check to refactor code in bulk.

This time, we will complete the rewriting of the source code...

Modules Are Not Precompiled Headers--Guillaume Racicot

Interesting talk about modules.

Modules Are Not Precompiled Headers

by Guillaume Racicot

From the article:

Modules have been the subject of many controversies in the C++ community in the recent past and there seem to be some misconception floating around recently about modules. Important decisions will soon be made, and I wanted to clear some of the facts and raise potentially good questions about modules and the path to their adoption.

I do not want to argue about how modules should have been and what should have not been. Instead I want to talk tabout modules as they are today, in the merged proposal.

String Proxy Puzzle -- Alex Marmer

C-style string cannot be used as a template parameter (X<"abc">() won't compile).

String Proxy​ Puzzle

by Alex Marmer

From the article

The puzzle is about how for any C-style string to use it's proxy as a template parameter and how to reconstruct the compile-time string from it.

 

 

 

Five Awesome C++ Papers for San Diego--Bartlomiej Filipek

What do you think?

Five Awesome C++ Papers for San Diego

By Bartlomiej Filipek

From the article:

In two weeks there will be a next C++ Committee meeting. This time the group of C++ experts will travel to San Diego, and they will discuss the shape of the upcoming C++ Standards. As far as I know, the meeting will hold a record in the number of submissions (276 proposals!) So it seems that the session will be quite exhausting smile

Here’s my list of five exciting papers that will be discussed during the meeting. I tried to pick something less popular, and usually smaller than significant features like modules, concepts or ranges...

Exploring Clang Tooling Part 2: Examining the Clang AST with clang-query--Stephen Kelly

The series continue.

Exploring Clang Tooling Part 2: Examining the Clang AST with clang-query

by Stephen Kelly

From the article:

In the last post, we created a new clang-tidy check following documented steps and encountered the first limitation in our own knowledge – how can we change both declarations and expressions such as function calls?

In order to create an effective refactoring tool, we need to understand the code generated by the create_new_check.py script and learn how to extend it.

Exploring Clang Tooling Part 1: Extending Clang-Tidy--Stephen Kelly

A very useful tool.

Exploring Clang Tooling Part 1: Extending Clang-Tidy

by Stephen Kelly

From the article:

This post is part of a three-part series about using the Clang AST Matchers to mechanically refactor C++ code. In the last post, we ensured that the code is at least buildable with Clang. While that part was only interesting to those whose code was not yet building with Clang, the rest of the series appeals to a general C++ audience.

There are many other resources on the internet covering use of existing clang-tidy checks and their motivation, such as my previous employer. There is very little information online about the developer workflow and tools to use when creating custom extensions for source to source transformations with clang-tidy. This blog series aims to fill that gap.

C++ Links #7—Bartlomiej Filipek and Wojciech Razik

The next episode of the 'most useful C++ links' is now available:

C++ Links #7

by Bartlomiej Filipek and Wojciech Razik

From the article:

Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 13th and 19th of October.

Today you will find links to all proposals that will be discussed in the upcoming Standard Committee meeting in San Diego, a video explaining why C++ is not an object-oriented programming language and many more!

Conversions, Searchers and C++17 In Detail Updates -- Bartlomiej Filipek

cpp17indetail

C++17 In Detail Book Update!

Conversions, Searchers and C++17 In Detail Updates

by Bartlomiej Filipek

From the article:

I’m happy to announce that I updated the book! “C++17 In Detail” grew by 31 pages (up to 250), includes two new chapters and lots of “bug” fixes and better explanations.

See the 2 new chapters about low-level String Conversion Routines and Searchers.

C++ Annotated: June - September 2018 -- Anastasia Kazakova

800x320_Twitter_card.pngConferences, proposals, and learning, O my!

C++ Annotated: June - September 2018

by Anastasia Kazakova

From the article:

... a hot C++ conference season kicked off again with CppCon. Pacific++, C++ CoreHard, Meeting C++, ADC, code::dive, and the C++ Committee meeting in San Diego, California, are coming up later this year...

... Today we are starting a new section in our regular C++ Annotated. In each issue, we will cover a selection of C++ proposals and initiatives you definitely should learn about while developing in C++. This time we unveil static exceptions, constexpr new, and lifetime checks. See details below...