June 2016

CppCast Episode 59: foonathan/memory and standardese with Jonathan Müller

Episode 59 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Jonathan Müller to discuss some of his recent blog posts, as well as the foonathan/memory library and the standardese documentation generator.

CppCast Episode 59: foonathan/memory and standardese with Jonathan Müller

by Rob Irving and Jason Turner

About the interviewee:

Jonathan is a CS student passionate about C++. In his spare time he writes libraries for real-time applications and games. He is mainly working on foonathan/memory which provides fast and customizable memory allocators that are easily integrated into your own code. Jonathan tweets at @foonathan and blogs about various C++ and library development related topics at foonathan.github.io. The blog posts are well received and often shared in the cpp subreddit or ISO C++.

Expression SFINAE improvements in VS 2015 Update 3--Andrew Pardoe

More news about the contunious improvements of VS 2015:

Expression SFINAE improvements in VS 2015 Update 3

by Andrew Pardoe

From the article:

Last December we blogged about partial Expression SFINAE support in VS 2015 Update 1. Some of the things we heard from you after that post are that you wanted better Expression SFINAE support, especially for popular libraries such as Boost and Range-v3. These libraries have been our focus over the last few months...

FunctionalPlus--Tobias Hermann

Here is a simple but powerful library that can helps us write code better:

FunctionalPlus

by Tobias Hermann

Summary:

helps you write concise and readable C++ code.

Great code should mostly be self-documenting, but while using C++ in reality you can find yourself dealing with low-level stuff like iterators or hand-written loops that distract from the actual essence of your code.

FunctionalPlus is a small header-only library supporting you in reducing code noise and in dealing with only one single level of abstraction at a time. By increasing brevity and maintainability of your code it can improve productivity (and fun!) in the long run. It pursues these goals by providing pure and easy-to-use functions that free you from implementing commonly used flows of control over and over again.

CppCon 2015 C++ in the Audio Industry--Timur Doumler

Have you registered for CppCon 2016 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2015 for you to enjoy. Here is today’s feature:

C++ in the Audio Industry

by Timur Doumler

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Sound is an essential medium for human-computer interaction and vital for applications such as games and music production software. In the audio industry, C++ is the dominating programming language. This talk provides an insight into the patterns and tools that C++ developers in the audio industry rely on. There are interesting lessons to be learned from this domain that can be useful to every C++ developer.

Handling audio in real time presents interesting technical challenges. Techniques also used in other C++ domains have to be combined: real-time multithreading, lock-free programming, efficient DSP, SIMD, and low-latency hardware communication. C++ is the language of choice to tie all these requirements together. Clever leveraging of advanced C++ techniques, template metaprogramming, and the new C++11/14 standard makes these tasks more exciting than ever.

Quick Q: c++ lambda capture by value

Quick A: A capture by value is a copy.

Recently on SO:

c++ lambda capture by value

That's because the variable is captured by value (i.e. copied) only once, when you define the lambda. It's not "updated" as you may believe. The code is roughly equivalent to:

#include <iostream>

int x = 0;
struct Lambda
{
    int _internal_x; // this is used to "capture" x ONLY ONCE
    Lambda(): _internal_x(x) {} // we "capture" it at construction, no updates after
    void operator()() const
    {
        std::cout << _internal_x << std::endl;
    }
} qqq;

int main()
{
    qqq();
    x = 77; // this has no effect on the internal state of the lambda
    qqq();
}

CppCon 2015 Advanced Unit Testing in C & C++--Matt Hargett

Have you registered for CppCon 2016 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2015 for you to enjoy. Here is today’s feature:

Advanced Unit Testing in C & C++

by Matt Hargett

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

This session goes in-depth into advanced techniques to isolate and unit test C++ classes, especially those in legacy code that isn't easy to change. This builds on the Pragmatic Unit Testing in C++ talk from last year, with live code examples of safe refactorings, injecting mock objects, and potential pitfalls across different platforms and toolchains.