ACCU 2016 All videos are online

All videos from the this year's ACCU conference are now online.

ACCU 2016 Videos

by the ACCU

From the schedule

The keynotes were:

Jim Coplien: A Glimpse of Trygve: From Class oriented Programming to Real OO

Andrei Alexandrescu: Fastware

Marian Petre: Balacing Bias in Software Development

Anna-Jayne Metcalfe: Comfort Zone

 

The talks with C++ content in no particular order were:

Dietmar Kühl: Constant Fun

Roger Orr: C++ Concepts 'Lite' in Practice

Felix Petriconi: Leaving The Dark Side - Behaviour Testing of a C++ Based Medical Device

J. Daniel Garcia: Improving Performance and Maintainability in Modern C++

Marshall Clow: STL Algorithms – How to Use Them and How to Write Your Own

Kevlin Henney: Declarative Thinking, Declarative Practice

Dmitri Nesteruk: Design Pattern in Modern C++

Jamie Allsop: Managing C++ Build Complexity Using Cuppa: A SCons-based Build System

Nikos Athanasiou: Benchmarking in C++

Sławomir Zborowski: What Every C++ Programmer Should Know About Modern Compilers

Peter Sommerlad: Visualize Template Instantiations - Understand your Template Bugs

Peter Sommerlad: Using Units, Quantities, and Dimensions in C++14

Niall Douglas: Distributed Mutual Exclusion using Proposed Boost.AFIO

John Lakos: Proper Inheritance Part 1 (Part 2 is not available)

Bernhard Merkle: Finding Bugs with Clang at Compile and Run Time

Guy Davidson: WG21-SG14: The Story So Far

 

Quick Q: Templated Function results in Circular Inclusion

Quick A: Separate definition and implementation.

Recently on SO:

Templated Function results in Circular Inclusion

Define registerEvent after IApp.

class IApp;

class Component
{
    IApp* app;
    template<typename T>
    void registerEvent(const int& evtId, Status (T::*func) (int));
};

class IApp : public Component {
  ...
};

template <typename T>
Component::registerEvent(const int& evtId, Status (T::*func) (int)) {
  auto res = std::bind(func, (T*)this, std::placeholders::_1);
  app->registerForEvent(evtId);
}

If need be, also define A::registerEvent after Component::registerEvent.

Quick Q: Why is list initialization (using curly braces) better than the alternatives?

Quick A: It is less likely to generate an unexpected error.

Recently on SO:

Why is list initialization (using curly braces) better than the alternatives?

Basically copying and pasting from Bjarne Stroustrup's "The C++ Programming Language 4th Edition":

List initialization does not allow narrowing (§iso.8.5.4). That is:

  • An integer cannot be converted to another integer that cannot hold its value. For example, char to int is allowed, but not int to char.
  • A floating-point value cannot be converted to another floating-point type that cannot hold its value. For example, float to double is allowed, but not double to float.
  • A floating-point value cannot be converted to an integer type.
  • An integer value cannot be converted to a floating-point type.

Example:

void fun(double val, int val2) {

    int x2 = val; // if val==7.9, x2 becomes 7 (bad)

    char c2 = val2; // if val2==1025, c2 becomes 1 (bad)

    int x3 {val}; // error: possible truncation (good)

    char c3 {val2}; // error: possible narrowing (good)

    char c4 {24}; // OK: 24 can be represented exactly as a char (good)

    char c5 {264}; // error (assuming 8-bit chars): 264 cannot be
                   // represented as a char (good)

    int x4 {2.0}; // error: no double to int value conversion (good)

}

The only situation where = is preferred over {} is when using auto keyword to get the type determined by the initializer.

Example:

auto z1 {99}; // z1 is an initializer_list<int>
auto z2 = 99; // z2 is an int

Conclusion

Prefer {} initialization over alternatives unless you have a strong reason not to.

CppCon 2015 Expression Templates - Past, Present, Future--Joel Falcou

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:

Expression Templates - Past, Present, Future+

by Joel Falcou

Part 1: (watch on YouTube) (watch on Channel 9)

Part 2: (watch on YouTube) (watch on Channel 9)

Part 3: (watch on YouTube) (watch on Channel 9)

Summary of the talk:

Expression Templates is one of this C++ idiom people learn to either love or hate. The main issues with ET is that everubody has its own conception about what they are, when they should be used, what benefits they give and what are their trade off. For a long time, Expression Tempaltes has been seen has a way to improve temporary heavy code. If the seminal implementation of ET by Todd Veldhuizen was actually about this, the landscape has changed since C++11 and C++14.

This workshop will go over : - what are exactly Expression Templates and what kind of use case they can solve elegantly and efficiently - what are the benefits that one may reap by using expression tempalte in its library - what are the real cost of expressont empaltes both at runtime and compile-time - which tools to use to not reinvent the tempalte wheel everytime including an introduction to Boost.PROTO an Boost.HANA.

The main objective is to clarify why, even in C++1*, this idiom has a meaningful set of applications and how to navigate around its pitfalls.

Top 10 dumb mistakes to avoid with C++ 11 smart pointers -- Deb Haldar

Discussion on various aspect of C++11 smart pointers uses.

Top 10 dumb mistakes to avoid with C++ 11 smart pointers

by  Deb Haldar

From the article:

I love the new C++ 11 smart pointers. In many ways, they were a godsent for many folks who hate managing their own memory. In my opinion, it made teaching C++ to newcomers much easier.

However, in the two plus years that I've been using them extensively, I've come across multiple cases where improper use of the C++ 11 smart pointers made the program inefficient or simply crash and burn. I've catalogued them below for easy reference.

CppCon 2015 Implementation of a component-based entity system in modern C++--Vittorio Romeo

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:

Implementation of a component-based entity system in modern C++

by Vittorio Romeo

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

An alternative to deep inheritance trees for game and application architecture design is "composition". Separating data (in independent components) from logic (in independent systems) allows the code to be more reusable and more efficient, alongside additional benefits. Using modern C++11 and C++14 features, it is possible to design an efficient and user-friendly component-based entity system library, with intuitive syntax and convenient cost-free abstractions.

boost 1.61.0 released

The boost community has released their library in version 1.61.0.

boost 1.61.0 released

by the boost organization

From the release note:

Beside many bug fixes and enhancements in the existing libraries, these new libraries were added:

New Libraries

Compute:
Parallel/GPU-computing library


DLL:
Library for comfortable work with DLL and DSO. Library provides a portable across platforms way to:

  • load libraries
  • import any native functions and variables
  • make alias names for C++ mangled functions and symbols
  • query libraries for sections and exported symbols
  • self loading and self querying
  • getting program and module location by exported symbol

Hana:
A modern C++ metaprogramming library. It provides high level algorithms to manipulate heterogeneous sequences, allows writing type-level computations with a natural syntax, provides tools to introspect user-defined types and much more.

Metaparse:
A library for generating compile time parsers parsing embedded DSL code as part of the C++ compilation process. The library is similar to Spirit, however while parsers built with Spirit parse at run-time, parsers built with Metaparse parse at compile-time.

 

CppCon 2015 Ranges for the Standard Library--Eric Niebler

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:

Ranges for the Standard Library

by Eric Niebler

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Range-based interfaces are functional and composable, and lead to code that is correct by construction. With concepts and ranges coming to the STL, big changes are in store for the Standard Library and for the style of idiomatic C++. The effort to redefine the Standard Library is picking up pace. Come hear about one potential future of the STL from one of the key people driving the change.

CppCon 2015 Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!--Chandler Carruth

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:

Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!

by Chandler Carruth

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

A primary use case for C++ is low latency, low overhead, high performance code. But C++ does not give you these things for free, it gives you the tools to control these things and achieve them where needed. How do you realize this potential of the language? How do you tune your C++ code and achieve the necessary performance metrics?

This talk will walk through the process of tuning C++ code from benchmarking to performance analysis. It will focus on small scale performance problems ranging from loop kernels to data structures and algorithms. It will show you how to write benchmarks that effectively measure different aspects of performance even in the face of advanced compiler optimizations and bedeviling modern CPUs. It will also show how to analyze the performance of your benchmark, understand its behavior as well as the CPUs behavior, and use a wide array of tools available to isolate and pinpoint performance problems. The tools and some processor details will be Linux and x86 specific, but the techniques and concepts should be broadly applicable.