advanced

Using Varadic Templates for a Signals and Slots Implementation in C++ -- Paul Cook

Fresh on GameDev.net:

Using Varadic Templates for a Signals and Slots Implementation in C++

By Paul Cook

From the article:

Abstract

Connecting object instances to each other in a type-safe manner is a well-solved problem in C++ and many good implementations of signals and slots systems exist. However, prior to the new varadic templates introduced in C++0x, accomplishing this has traditionally been complex and required some awkward repetition of code and limitations.

Varadic templates allow for this system to be implemented in a far more elegant and concise manner and a signals/slots system is a good example of how the power of varadic templates can be used to simplify generic systems that were previously difficult to express. ...

Generator functions in C++ -- Paolo Severini

Paolo Severini expands the concept of resumable functions to support generator functions, providing the ability of lazily producing the values in a sequence only when they are needed.

Generator functions in C++

by Paolo Severini

From the article:

In the previous post we had a look at the proposal of introducing resumable functions into the C++ standard to support writing asynchronous code modeled on the C# async/await pattern.

We saw that it is already possible to experiment with the future resumable and await keywords in Visual Studio, by installing the latest November 2013 CTP. But the concept of resumable functions is not limited to asynchrony; in this post we’ll see how it can be expanded to support generator functions.

Generator functions and lazy evaluation

In several languages, like C# and Python, generator functions provide the ability of lazily producing the values in a sequence only when they are needed. ...

Masking a Class in Boost.Graph -- Vadim Androsov

Here's an experience report about using Boost's graph support in an existing game app, with some notes about Boost Concepts:

Masking a Class in Boost Graph. Part 1: Let the Interface Be

Masking a Class in Boost Graph. Part 2: Completing the Implementation of Concept Support

by Vadim Androsov

From the articles:

I had to rebuild a pathfinding algorithm for our game recently. The previous one (Boost Concepts) was bad as any sidestep was dangerous. So I wanted to take a ready algorithm from a good source. That’s exactly when I remembered about boost as there’s functionality for working with graphs. Unfortunately “find a function, call it and everything will work” approach wasn’t meant to be realized. The library is focused on the maximum use flexibility which has badly affected its simplicity. But it’s better than creating it from scratch (then fixing it). I didn’t want to bother with other libraries, while boost has already been used in the project. ...

Range Comprehensions -- Eric Niebler

Do you "comprehend" ranges? From a key participant in some of the latest discussion about ranges for C++:

Range Comprehensions

by Eric Niebler

From the article:

I’ve been busy since I last wrote about ranges. I have a lot of news to share, but in this post, I’m going to narrowly focus on a recent development that has me very excited. It’s a new feature that I’m calling range comprehensions, and they promise to greatly simplify the business of creating custom ranges...

CppCon 2014 super early bird almost sold out -- ~20 tickets left

cppcon-144.PNGIf you've been thinking of registering for CppCon, you can save by doing it in the next couple of days. Over at CppCon.org, Boris Kolpackov reports:

Super Early Bird Last Chance

In the past couple of weeks a lot of C++ enthusiasts have registered for CppCon 2014 and as a result we only have about 20 super early bird entries left. If you are planning to attend, this is your last chance to register at the most affordable price.

After the limited Super Early Bird is full, Early Bird registration will be available until the end of June. Student registrations are also available at a heavily subsidized rate to ensure students can take advantage of the program.

See also the Call For Submissions to see the kinds of topics that you can expect to see covered.

 

Parsing XML at the Speed of Light--Arseny Kapoulkine

Some high-performance techniques that you an use for more than just parsing, including this week's darling of memory management:

Parsing XML at the Speed of Light

a chapter from "The Performance of Open Source Applications"
by Arseny Kapoulkine

From the chapter:

This chapter describes various performance tricks that allowed the author to write a very high-performing parser in C++: pugixml. While the techniques were used for an XML parser, most of them can be applied to parsers of other formats or even unrelated software (e.g., memory management algorithms are widely applicable beyond parsers). ...

Optimizing software is hard. In order to be successful, optimization efforts almost always involve a combination of low-level micro-optimizations, high-level performance-oriented design decisions, careful algorithm selection and tuning, balancing among memory, performance, implementation complexity, and more. Pugixml is an example of a library that needs all of these approaches to deliver a very fast production-ready XML parser–even though compromises had to be made to achieve this. A lot of the implementation details can be adapted to different projects and tasks, be it another parsing library or something else entirely.

Continue reading...

C++ and Beyond Road Show 2014 -- September 29 - October 1, Stuttgart, Germany

Today on the C++ and Beyond blog, Scott Meyers announced that registration is now open for a C&B event in Germany this fall, largely repeating the C&B December 2013 material for the benefit of those who were not able to attend the sold-out event in December.

C&B 2014: September 29 - October 1 in Stuttgart!

with Scott Meyers, Herb Sutter, Andrei Alexandrescu

Maritim Hotel, Stuttgart, Germany
September 29 - October 1, 2014

Note: The web page for the event is in German, but the seminar itself will be given in English.

From the announcement:

You can think of this event as the C&B Road Show, because the organization is a little different from how we’ve done things in the past: Most of the talks will be updated versions of the presentations we gave at C&B 2013. (See the schedule here.) If you were unable to attend C&B this past December, this is your chance to see what you missed. ... [See the] web page for C&B 2014 for all the details of this event.

This will be the only C&B in 2014, so we hope to see you in Stuttgart at the end of September for the first-ever C&B in Europe!

Native Code Performance on Modern CPUs: A Changing Landscape -- Eric Brumer

eric-brumer-build-2014.PNGThis C++ optimization talk is one of the highest-rated talks from last week's //build/ conference, and deservedly so.

Be prepared for deep content from a compiler optimizer architect, and quite a bit of subtle dry humor.

Native Code Performance on Modern CPUs: A Changing Landscape

by Eric Brumer
Compiler developer, Visual C++ team

Modern CPUs are fast. Really fast. New instructions, wider vector registers, and more powerful CPUs promise faster code. But reasoning about performance is not as it seems on the surface. This talk will dive deep into how advancements in the latest chips force some rethinking of native code performance, from the point of view of a compiler developer. The performance landscape is changing. Come see what that means.