Articles & Books

Access tuple-like container by type to return an index -- Krzysztof Ostrowski

How would you look for an item in a tuple by the item's type, and return the item's index within that tuple?

Access tuple-like container by type to return an index

by Krzysztof Ostrowski

From the article:

Presentation of a technique that composes an application of a lazy fold expression, and an idea of type embellishment that introduces an implicit context in which the current tuple element is embedded.

C/C++ Include Guidelines -- Thomas Young

Good practices for setting up include files are key to keeping large code-bases manageable, in pre-modules C++, and this article presents 15 rules to keep you on the right track.

C/C++ Include Guidelines

by Thomas Young

From the article:

The rules listed here are relatively mechanical, by which I mean that these are things that can be applied locally to individual bits of source code, without strokes of genius or flashes of inspiration, but with the possibility to nevertheless significantly improve code organisation, which is useful particularly in the case of large legacy code bases.

How to Merge Consecutive Elements in a C++ Collection--Jonathan Boccara

Simple and sweet.

How to Merge Consecutive Elements in a C++ Collection

by Jonathan Boccara

From the article:

Merging identical consecutive elements in a collection is a recurring need, in C++ or elsewhere in programming.

For example, we could want to aggregate a collection of hourly results into a collection of daily results: all the results of each day get aggregated into one for that day. In this case, being “identical” means being on the same day, and “aggregating” means taking two results with a common date, and creating a result at this date and with the sum of their amounts...

Overload 153 is now available

ACCU’s Overload journal of October 2019 is out. It contains the following C++ related articles.

Overload 153 is now available

From the journal:

Predictions and Predilections.
Forecasting the future is difficult. Frances Buontempo has a foreboding sense that a lack of impartially makes things even harder.

Scenarios Using Custom DSLs.
Natural-language BDD can be hard to maintain. Liz Keogh demonstrates a simple code-based alternative.

OOP Is not Essential.
People tend to love or hate Object Oriented Programming. Lucian Teodorescu considers a recent OOP claim.

I Come Here Not to Bury Delphi, But to Praise It.
What helps a programming language gain traction? Patrick Martin remembers why he used to use Delphi.

C++ Pipes.
Expressive code can make life easier. Jonathan Boccara demonstrates fluent pipelines for collections in C++.

Cppcon 2019 Milestone | New Home | Trip Reports--Jon Kalb

Many things happened.

Milestone | New Home | Trip Reports

by Jon Kalb

From the article:

CppCon 2019 was the first year in our new home at the Gaylord Rockies in Aurora, Colorado.

Long before I’d ever done it, I told people that I thought that moving a conference is almost as much work as starting one from scratch. Now that I have moved a conference, I’ve learned that started a conference from scratch is actually easier than moving that conference after it has been growing in one location for five years...