intermediate

C++: The Good Parts -- Jordan DeLong

delong.PNGA fun(ctional) talk from QCon:

C++: The Good Parts (slides)

by Jordan DeLong

The talk abstract:

Although C++ originated with the primary aim of adding Object Oriented features to C, it has evolved from the OO paradigm into a multi-paradigm language with strong support for various functional programming idioms.   C++11 adds several language features, most notably lambda expressions, that are overtly functional. But even prior to C++11, key parts of the standard library sported a design that has fundamentally more in common with functional programming than with OO.   This talk gives an overview of the past, current and near future "good parts" of C++'s functional side, through the colored lens of the speaker's biases.

 

Compiler support for C++11 and C++14

C++11 support is still an interesting topic, even that GCC and Clang now fully support it. Also the upcoming C++14 standard is already getting implemented by a lot of compilers. There are two very interesting publications about this topic in recent weeks, first, on italiancpp.org there is a PDF on C++11 and C++14 feature support for Visual C++, Intel, Clang and GCC. Also Just a few days ago, a interesting blogpost about this topic was published on C++Rocks, focussing on compiler and library support:

C++11/14 compiler and library shootout

by C++ Rocks

From the Article:

It’s been almost a year since my last comparison of C++11 support across different compilers, so I decided to take a break from working on my book about C++11/14 features in VS2013, and see how things have changed.

Range Concepts, To Infinity And Beyond

The 4th part in Erics series on ranges:

Range Concepts, Part 4 of 4: To Infinity And Beyond

by Eric Niebler

From the Article:

Last time, I introduced a new concept, Iterable, and showed how it solved many of the problems with pair-of-iterator-style ranges. This time around, I’m going to extend Iterable in small ways to make programming with infinite ranges safer and more efficient. Disclaimer: The ideas in this post are more speculative than in the previous three. I’m looking forward to the disucussion.

C++17: I See a Monad in Your Future!

Thoughts on Monads and Futures in C++

C++17: I See a Monad in Your Future!

by Bartosz Milewski

From the Article:

If you thought you were safe from functional programming in your cozy C++ niche, think again! First the lambdas and function objects and now the monad camouflaged as std::future. But do not despair, it’s all just patterns. You won’t find them in the Gang of Four book, but once you see them, they will become obvious.

Range Concepts, Part 3 of 4: Introducing Iterables

The third part of Eric Nieblers Series on ranges

Range Concepts, Part 3 of 4: Introducing Iterables

by Eric Niebler

From the Article:

In the last two blog posts, I describes the challenges I’ve encountered while building a next-generation range library. In this post, I’ll sketch for you my proposed solution: refinements of the range concepts that allow delimited, infinite, and pair-o’-iterator-style ranges to fit comfortably within the concept hierarchy without loss of performance or expressive power and with increased safety. I’ve built a range library around these concepts that subsumes and extends all of the C++98 STL algorithms and the Boost.Range adaptors, so I can say with confidence that these concepts lead to a useful and consistent generic range library.

Range Concepts, Part 2 of 4: Infinite Ranges

The second part of Eric Nieblers Series about ranges:

Range Concepts, Part 2 of 4: Infinite Ranges

By Eric Niebler

From the Article:

In the last post, I tried to make delimited ranges fit into the STL and found the result unsatisfying. This time around I’ll be trying the same thing with infinite ranges and will sadly be reaching the same conclusion. But the exercise will point the way toward an uber-Range concept that will subsume delimited ranges, infinite ranges, and STL-ish pair-o’-iterator ranges.

Range Concepts, Part 1 of 4: Delimited Ranges

The start on a series about ranges from Eric Niebler:

Range Concepts, Part 1 of 4: Delimited Ranges

By Eric Niebler

From the Article:

I’ve been digging into ranges recently, and I’m finding them to be more than just a pair of iterators. In a series of posts, I’ll be expanding the notion of what a range is to cover some kinds of ranges not easily or efficiently expressible within the STL today: delimited ranges and infinite ranges. This post deals with the problems of representing delimited ranges with STL iterators.

Find the Bug -- Andrzej Krzemieński

Can you spot the bug?

Find the Bug

by Andrzej Krzemieński

From the article:

Today, let's take a short test. Find what is likely to be a bug in the following code and suggest how to fix it.

void Catalogue::populate(vector<string> const& names)
{
  vec_.clear();
  vec_.resize(names.size());

  for (size_t i = 0; i < names.size(); ++i)
    vec_[i] = make_unique<Entry>(names[i]);
}