advanced

The bell has tolled for rand()--Indi

An extensive article about rand(), it's replacement in C++11 and the possible future was posted last december:

The bell has tolled for rand()

by Indi

Form the article:

In their recent meeting in Urbana, the C++ standard committee took the rare step of removing several outdated facilities from (what will probably become) C++17. Most of the things removed had been deprecated since C++11, but there was one surprising item on the list: std::random_shuffle(). Its removal is a signal of a big change that has been building in the background for a while: the end of std::rand()...

Using Enum Classes as Bitfields -- Anthony Williams

How to use enum classes as as bitfields in modern C++ programs.

Using Enum Classes as Bitfields

by Anthony Williams

From the article:

C++11 introduced a new feature in the form of scoped enumerations, also referred to as enum classes, since they are introduced with the double keyword enum class (though enum struct is also permissible, to identical effect). To a large extent, these are like standard enumerated types: you can declare a list of enumerators, which you may assign explicit values to, or which you may let the compiler assign values to. You can then assign these values to variables of that type. However, they have additional properties which make them ideal for use as bitfields. I recently answered a question on the accu-general mailing list about such a use, so I thought it might be worth writing a blog post about it.

 

Interactive Metaprogramming Shell based on Clang

A new video from Meeting C++ 2014:

Interactive Metaprogramming Shell based on Clang

by Ábel Sinkovics

From the talk description:

Developing metaprograms is hard and painful. Templight (http://plc.inf.elte.hu/templight/) supports the development and debugging of template metaprograms, but the code has to be recompiled after every minor change and tricks are needed to retrieve useful information about the result...

The compiler can make up its own calling conventions, within limits--Raymond Chen

A new article from the Old New Thing:

The compiler can make up its own calling conventions, within limits

by Raymond Chen

From the article:

There are three parties to a calling convention. The function doing the calling. The function being called. The operating system. The operating system needs to get involved if something unusual occurs, like an exception, and it needs to go walking up the stack looking for a handler...

Expression Templates Revisited

A new video from Meeting C++ 2014!

Expression Templates Revisited

by Klaus Iglberger

From the talk description:

Since their invention in 1995, Expression Templates (ETs) have proven to be a valuable tool for many C++ template libraries. Especially numerics libraries quickly embraced them as salvation for the performance deficiencies of standard C++. This reputation as performance optimization...

C++ SIMD parallelism with Intel Cilk Plus and OpenMP 4.0

A new video from Meeting C++ 2014

C++ SIMD parallelism with Intel Cilk Plus and OpenMP 4.0

by Georg Zitzlsberger

From the talk description:

Performance is one of the most important aspects that comes to mind if deciding for a programming language. Utilizing performance of modern processors is not as straight forward as it has been decades ago. Modern processors only rarely improve serial execution of applications by increasing their frequency or adding more execution units.

CppCon 2014 The Canonical Class--Michael Caisse

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

The Canonical Class

by Michael Caisse

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

It was a simpler time. A period in which every college student and learn-C++-in-a-weekend duffer could write a class with the assuredness that it would behave as desired when assigned and copied. There was a check list. Complete the checklist, add some domain specific behaviour, bake in the regression oven, and you were done.

Enter C++11 with its fancy new use of the delete keyword, additional applications of explicit, rvalue references, and some perfect forwarding. How are you to write a "simple" class? Should you include a swap? What does movable mean and are there expected semantics? When is the noexcept specifier used?

During this session we will explore the boilerplate of a C++11 class. The session will touch on rvalue references, move semantics, perfect forwarding, explicit, noexcept, initializer lists, and more as it applies to producing the desired semantics for our classes and structs.

Generic Parallel Programming

A new video from Meeting C++ 2014:

Generic parallel programming for scientific and technical applications

by Guntram Berti

From the talk description:

Technical and scientific applications dealing with a high computational load today face the challenge to match the increasingly parallel nature of current and future hardware. The talk shows how the increased complexity of software can be controlled by using generic programming technologies. The process and its advantages are introduced using many concrete examples...