We have an exciting week ahead of us as we start announcing the CppCon 2016 program. The full program will be published next Sunday. Until then, we’ll broadcast a handful of talks each day. Make sure to check tomorrow’s preview – we’ll reveal one of the keynotes!

Let’s start off with some sessions about generic algorithms in the standard library:

We also have a few talks about exceptions to share:

The gaming community has always been a part of CppCon, and this year is no exception. Here’s some of the game development content that you’ll see at CppCon this year:

If you want to come join us for CppCon 2016, there’s still time to register!

— Bryce Adelstein Lelbach

Regular Expressions in C++, Present and Future

Regular expressions are widely used in application development and data processing, yet it is challenging to design and implement a regular expression library that is expressive, efficient and safe. In this talk, I will introduce the basics of implementing regular expressions in C++, the status of existing implementations, and what is expected from the standardization process.

For the implementation, several data structures and algorithms will be introduced, with pros and cons listed; we will show how several popular implementations (Boost.Regex, Boost.Xpressive, <regex> from standard library implementations, RE2, etc) pick their algorithms. Several popular features/patterns that hurt performance will be explained, with a “safe” regex usage suggested. Finally a wishlist of features will be presented, in order to deliver a more efficient and usable regex library.

Tim Shen is an engineer from the Google LLVM team. His major focus is the performance of C++ on various LLVM backends. He’s also the maintainer for libstdc++‘s <regex> implementation.

STL Algorithms – Why You Should Use Them, and How to Write Your Own

One of the most powerful features of the C++ standard library is the collection of basic algorithms. Everyone knows about sort and copy, but there are is a lot of powerful capabilities in the other algorithms as well. In this talk, I will explore some of the algorithms in the library, and give a rationale for writing your own, along with examples.

The motivation for writing your own algorithms is that you can create generic building blocks that can be used over and over again in your library or application, and which will allow your to program at a higher level of abstraction. Instead of thinking, “how do I sort this vector”, you just call std::sort() . The same should apply to the algorithms that are specific to your domain – once you write them.

Marshall is a long-time LLVM and Boost participant. He is a principal engineer at Qualcomm, Inc. in San Diego, and the code owner for libc++, the LLVM standard library implementation. He is the author of the Boost.Algorithm library and maintains several other Boost libraries.

The C++17 Parallel Algorithms Library and Beyond

One of the major library features in C++17 is a parallel algorithms library (formerly the Parallelism Technical Specification v1). The parallel algorithms library has both parallel versions of the existing algorithms in the standard library and a handful of new algorithms inspired by common patterns from parallel programming (such as std::reduce() and std::transform_reduce() ).

We’ll talk about what’s in the parallel algorithms library, and how to utilize it in your code today. Also, we’ll discuss some exciting future developments relating to the parallel algorithms library which are targeted for the second version of the Parallelism Technical Specification – executors, and asynchronous parallel algorithms.

Bryce Adelstein Lelbach is a researcher at Lawrence Berkeley National Laboratory (LBNL), a US Department of Energy research facility. Working alongside a team of hardware engineers, mathematicians and physicists, he develops and analyzes new parallel programming models for exascale and post-Moore architectures. Bryce is one of the developers of the HPX C++ runtime system; he spent five years working on HPX while he was at Louisiana State University’s Center for Computation and Technology. He also helped start the LLVMLinux initiative, and has occasionally contributed to the Boost C++ libraries. Bryce is an organizer for C++Now and CppCon conferences and he is passionate about C++ community development. He serves as LBNL’s representative to the C++ standards committee.

std::accumulate(): Exploring an Algorithmic Empire

What is the most powerful algorithm in the STL? In the world? There are many cases to be made. But this talk explores what I think is a pretty good candidate, which C++ calls std::accumulate() . Tucked away in <numeric> , perhaps relatively unregarded when compared with workhorses like std::find_if() and std::partition() ; nevertheless, std::accumulate() is in some sense the ur-algorithm on sequences.

Let’s explore the result of looking at code through an accumulate-shaped lens, how tweaking the algorithm for better composability can unlock many more uses, and how it can be further genericized with applications to parallelism, tree structures, and heterogeneous sequences.

std::accumulate() : it’s not just for adding things up!

Ben Deane is a career (20+ years) games industry programmer and generic/functional programming enthusiast. He’s keen on performance (of course: C++, games) and he likes using theory to gaining insights into practical problems. Ben is currently a principal engineer at Blizzard Entertainment where he drives a lot of internal C++ learning. He’s previously presented at C++Now and CppCon.

Out of Memory? Business as Usual: Examining Applications That Do Not Terminate on std::bad_alloc

System memory holds a special place in the hierarchy of program resources; its availability is the implied precondition for many innocuous lines of code, from std::string::substr() to passing std::function<> by value. The ability to always create another object is ingrained in the OOP mindset so much that it is often said that immediate termination is the cleanest way to handle memory allocation failures in most situations. Nevertheless, C++, when consistently applying RAII, makes it possible to treat memory allocation exactly as any other resource acquisition.

To what degree do actual applications take advantage of that possibility and what responses to allocation failures are there in the wild? This presentation will examine over 300 open source projects that incorporate explicit handling for std::bad_alloc , examine the causes (it’s not always “out of memory”), response strategies (it’s more than just rollback), and related practical considerations.

Sergey Zubkov is a former biochemistry researcher and OS developer, who now works in finance and spends his free time editing cppreference.com.

The Exception Situation

Exceptions have been a part of C++ for a long time now, and they are not going away. They allow programmers to concentrate on the meaningful parts of their code and treat the things that happen infrequently as… well, exceptional situations, to be dealt with when and where the context makes it reasonable or useful.

On the other hand, some significant parts of the C++ programming community either dislike this mechanism or outright reject it, for a number of reasons. Work in SG14 has raised performance issues in some cases; there are those who dislike the additional execution paths introduced in programs that rely on exceptions; some programmers raised issues with respect to exceptions and tooling, integration with older codebases, writing robust generic code, etc.

This talk will be neither for not against exceptions. It will present a perspective on cases where they make sense, cases where they are less appropriate, alternative disappointment handling techniques presented along with client code in order to show how the various approaches influence the way code is written. Performance measurements will be given along the way. Some creative uses of exceptions will also be presented in order to spark ideas and discussions in the room.

Patrice Roy has been playing with C++, either professionally, for pleasure or (most of the time) both for over 20 years. After a few years doing R&D and working on military flight simulators, he moved on to academics and has been teaching computer science since 1998. Since 2005, he’s been involved more specifically in helping graduate students and professionals from the fields of real-time systems and game programming develop the skills they need to face today’s challenges. The rapid evolution of C++ in recent years has made his job even more enjoyable.

He’s been a participating member in the ISO C++ Standards Committee since late 2014 and has been involved with the ISO Programming Language Vulnerabilities since late 2015. He has five kids, and his wife ensures their house is home to a continuously changing number of cats, dogs and other animals.

Exploring Modern C++ Game Development with Unreal Engine 4

With the 2014 open source release of Epic Games’ Unreal Engine 4 (colloquially UE4 or just Unreal Engine), game developers were introduced to a powerful set of tools and libraries designed for building high-quality “AAA” games, portable mobile games, and eye-popping virtual reality experiences. In addition to an advanced content editor and rapid prototyping environment, Unreal Engine 4 is built atop an extensive C++ game engine that includes support for object serialization, reflection, and network replication.

In this talk, best practices of modern C++ game development are explored in the context of a simple game built in Unreal Engine 4. The use of lambda functions for callbacks, move semantics for improving performance in critical sections of code, and range-based for statements are some of the topics covered. The author will discuss how smart pointers are used to manage object lifetime and how Unreal Engine 4 facilitates garbage collection of dead objects. The talk will also examine the methods that Unreal Engine 4 uses to support multiple compiler toolchains at various levels of C++14 conformity .

This talk does not require prior knowledge of Unreal Engine 4 or game development processes. Attendees should have basic to intermediate knowledge of modern C++ syntax and practices. Source code for the content presented will be available for download prior to the talk and attendees are encouraged to follow along using the latest version of Unreal Engine 4 (version 4.11 at the time of this writing). C++ developers who are evaluating Unreal Engine for their own projects may find this talk useful in making a determination.

Marcus R. Brown is Technical Director at Rainbow Studios in Phoenix, Arizona. He is extremely passionate about developing games that are pleasing to players. He has both written and assisted in the creation of expandable, reusable game technologies and tools that have been used in both niche and AAA titles across a variety of game genres.

As a 12-year game industry veteran, Marcus has both lead and assisted team members with backgrounds in various software engineering disciplines. He has shipped over 20 games and mobile applications, including titles in the acclaimed Madden, Guitar Hero, and Medal of Honor series. He has developed games on nearly every major gaming platform that has been released in the past two decades, from high-end game consoles (PlayStation 2 up to PlayStation 4, Xbox through Xbox 360, and Wii) to mobile devices (iOS and Android).

With the release of C++14, and after attending CppCon for the first time in 2015, Marcus has become infatuated with modern C++ principles as they pertain to game development and other high-performance applications. He actively promotes modern C++ development practices while leading his teams in constructing high-quality games. Marcus has yet to find a challenge arising in game development that could not be bested by modern C++!

The MAME (Multi-Arcade Machine Emulator) Story: From C to Modern C++

In 1997, the MAME project was started as a DOS application written in C. Initially it could emulate a single arcade game, but today we have over 30,000 games. During the years, the code base grew but until 2009, there were no big steps. The we started using C++.

This case study will show how moving from C and plain C++ to modern C++ benefited both developers and end users, how we got better compatibility and portability, and better code. We will also discuss libraries that we feel are missing from the standard and the libraries that we are sharing with the community.

Miodrag Milanović was born in 1978. He has a Bachelor of Computer Science (but equivalent of Master Degree due to Bologna process). He has worked for some years as a C++ developer for various international customers. Starting in 2012, he has been the coordinator of MAME emulation project, pushing hard for modernization of the two decade old code.

Rainbow Six Siege: Quest for Performance

This talk will focus on what was done to ship Rainbow Six Siege at 60 frames per second (FPS). Delivering a game with 5 versus 5 multi-player with heavy procedural environment destruction at 60 FPS was a constant challenge. From memory usage to lock-free solutions, a lot of developed C++ solutions are reusable outside of games. Some interesting analysis tools were also developed to find issues, and their concepts could be reused by any C++ developer caring about performance.

Nicolas Fleury has 13 years of experience in the video game industry, and more years in the software industry as a C++ programmer in telecoms, speech recognition and computer assisted surgery. Technical Architect on Tom Clancy’s: Rainbow Six Siege, he is one of the key Architects behind some collaboration initiatives at Ubisoft and was Technical Architect on Prince of Persia and Just Dance 3 Kinect.