advanced

Quantifiers, metaprogramming and concepts -- Nikos Athanasiou

Quantification expresses the extent to which a predicate is true over a set of elements. This installment describes the use of predicate logic in metaprogramming.

Quantifiers, metaprogramming and concepts

by Nikos Athanasiou

From the article:

Metaprograms often use predicate logic in creative ways. For example, type queries in generic code are used to constrain, dispatch, specialize, activate or deactivate code at compile time.

More Meeting C++ 2016 videos are online!

A week full of video editing brings the first batch of Meeting C++ 2016 videos online:

More videos are online!

by Jens Weller

Meeting C++ 2016 Playlist

From the article:

With today, almost all videos from the A and all videos of the D Track are online. There is a recording issue with one talk in the A track, which might get resolved in 2017. Also since today, the Meeting C++ YouTube channel has more then 400k views!

The full video set you can find in the Meeting C++ 2016 Playlist, the newest videos are easily found by visiting the Meeting C++ YouTube channel or subscribing to this RSS feed.

Capturing perfectly-forwarded objects in lambdas -- Vittorio Romeo

Does [x = std::forward<decltype(x)>] behave like you expect?

capturing perfectly-forwarded objects in lambdas

by Vittorio Romeo

From the article:

Perfect forwarding and forwarding references allow developers to write generic template functions that retain the lvalueness/rvalueness of passed arguments [...] Let's try to use auto&&, std::forward and C++14's generalized lambda capture syntax to implement our desired semantics. [...] What we really want to do is:

  • Capture by copy if a is an rvalue reference.
  • Capture by reference if a is an lvalue reference.

[...]

Technical Debt - More Captureless Lambda Fun -- Adi Shavit

More interesting facts about captureless lambdas.

Technical Debt

by Adi Shavit

From the article:

The series on captureless lambdas generated some interesting comments.  
The articles discusses converting captureless lambdas into function pointers without explicitly specifying the cast-to type, calling conventions and standard conformance and a special callbackizing function for capturing lambdas.

Compose and curry as folds--Nick Athanasiou

With the next version of C++.

Compose and curry as folds

by Nick Athanasiou

From the article:

In a previous post we introduced C++17 fold expressions and described a way to extend them for arbitrary callables. Implementation details don’t matter for what we’re elaborating on here but it should be clear that (given the tools we developed) the following is possible:

(Op<F>(args) + ...)
(... + Op<F>(args))

Infographics: Operation Costs in CPU Clock Cycles--“No Bugs” Hare

A very interesting article about the cost of our basic operations.

Infographics: Operation Costs in CPU Clock Cycles

by “No Bugs” Hare

From the article:

Whenever we need to optimise the code, we should profile it, plain and simple. However, sometimes it makes sense just to know ballpark numbers for relative costs of some popular operations, so you won’t do grossly inefficient things from the very beginning (and hopefully won’t need to profile the program later �� )...

Terminators--Adi Shavit

Do you know how a program ends?

Terminators

by Adi Shavit

From the article:

A GraphViz diagram that shows both normal and unexpected program termination flows in C++.

There are multiple ways a C++ program may terminate. These include both normal and unexpected termination.
This GraphViz diagram shows the program termination flows as defined by the standard...