Events

Bjarne Stroustrup announces C++ Core Guidelines

This morning in his opening keynote at CppCon, Bjarne Stroustrup announced the C++ Core Guidelines (github.com/isocpp/CppCoreGuidelines), the start of a new open source project on GitHub to build modern authoritative guidelines for writing C++ code. The guidelines are designed to be modern, machine-enforceable wherever possible, and open to contributions and forking so that organizations can easily incorporate them into their own corporate coding guidelines.

The initial primary authors and maintainers are Bjarne Stroustrup and Herb Sutter, and the guidelines so far were developed with contributions from experts at CERN, Microsoft, Morgan Stanley, and several other organizations. The guidelines are currently in a “0.6” state, and contributions are welcome. As Stroustrup said: “We need help!”

Stroustrup said: “You can write C++ programs that are statically type safe and have no resource leaks. You can do that without loss of performance and without limiting C++’s expressive power. This supports the general thesis that garbage collection is neither necessary nor sufficient for quality software. Our core C++ guidelines makes such code simpler to write than older styles of C++ and the safety can be validated by tools that should soon be available as open source.”

From Stroustrup’s talk abstract:

In this talk, I describe a style of guidelines that can be deployed to help most C++ programmers... The rules are prescriptive rather than merely sets of prohibitions, and about much more than code layout... The core guidelines and a guideline support library reference implementation will be open source projects freely available on all major platforms (initially, GCC, Clang, and Microsoft).

Although the repository was not officially announced until today, it was made public last week and was noticed: CppCoreGuidelines was the #1 trending repository worldwide on GitHub on Friday, and is currently the #1 trending repository worldwide for the past week, across all languages and projects.

Stroustrup also announced two other related projects.

Guideline Support Library (GSL): First, the C++ Core Guidelines also specifies a small Guideline Support Library (GSL), a set of common types like array_view and not_null to facilitate following the modern guidelines. An initial open source reference implementation contributed and supported by Microsoft is now available on GitHub at github.com/Microsoft/GSL. It is written in portable C++ that should work on any modern compiler and platform, and has been tested on Clang/LLVM 3.6 and GCC 5.1 for Linux, with Xcode and GCC 5.2.0 for OS X, and with Microsoft Visual C++ 2013 (Update 5) and 2015 for Windows. This is both a supported library and an initial reference implementation; other implementations by other vendors are encouraged, as are forks of and contributions to this implementation.

Checker tool: Second, the C++ Core Guidelines are designed to be machine-enforceable wherever possible, and include many rules that can be checked by a compiler, lint, or other tool. An initial implementation based on Microsoft’s Visual Studio will be demonstrated in several talks at CppCon this week, including Herb Sutter’s Day 2 plenary session tomorrow morning. This implementation will be made available as a Windows binary in October, with the intention to open source the implementation thereafter. This too will become a supported tool and an initial reference implementation open to others; other implementations by other vendors of compilers, linters, and other tools are encouraged.

A number of other CppCon talks will go deeper into the related topics, notably the following talks by speakers who collaborated on the Guidelines effort:

Herb Sutter: Writing Good C++14 by Default (Tue 10:30am)

Gabriel Dos Reis: Large Scale C++ with Modules: What You Should Know (Tue 2:00pm)

Neil MacIntosh: More Than Lint: Modern Static Analysis for C++ (Wed 2pm)

Neil MacIntosh: A Few Good Types: Evolving array_view and string_view for Safe C++ Code (Wed 3:15pm)

Gabriel Dos Reis: Contracts for Dependable C++ (Wed 4:45pm)

Eric Niebler: Ranges and the Future of the STL (Fri 10:30am)

(and more)

If you’re at CppCon this week, watch for those talks. If you aren’t, like last year’s event, CppCon 2015 is again professionally recording all talks, and they will be freely available online about a month after the conference.
 

The Visual C++ team is at CppCon 2015 by Eric Battalio

CppCon 2015 starts in two hours:

The Visual C++ team is at CppCon 2015

by Eric Battalio

From the article:

Steve Carroll and Ayman Shoukry cover what's new in VC++ early on Thursday morning. Ankit Asthana and Marc Gregoire will update us on the [Clang-based] support for cross-platform mobile development in VS 2015... James Radigan will talk about the work that we're doing to connect the Clang front end to the Microsoft optimizing back end [and] how we're working with the community to make this possible... Gabriel Dos Reis will talk about C++ Modules, a new design that helps with componentization, isolation from macros, scalable build, and support for modern semantics-aware developer tools. ...

Stephan T. Lavavej will discuss developments in <functional> from C++11 to C++17. We'll hear about contracts from Gabriel Dos Reis, and ... Artur Laksberg goes into the details of the Concurrency TS while Gor Nishanov describes the exciting future of concurrency in C++: coroutines, an abstraction that makes your code both simpler and execute faster. ...

You might have noticed a new repo that the Standard C++ Foundation published last week: the C++ Core Guidelines... Bjarne will talk about this in his keynote on Monday morning, and Herb Sutter will continue the discussion with his talk on Tuesday. And we've not only been working on the guidelines: we've implemented a library to support the guidelines and enforcement tools that automatically verify that your code follows them. Neil MacIntosh will discuss both of these projects in his back-to-back talks on Wednesday afternoon. The C++ Core Guidelines are a huge step forward for the language and the Visual C++ team is excited to be part of the group working on bringing them to reality!

CppCon 2015 Program Highlights, 15 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The following interrelated CppCon 2015 talks tackle interesting issues and more.

In this post:

  • Grill the Committee
  • C++ on the Web: ponies for developers without pwn’ing users
  • Implementation of a component-based entity system in modern C++14
  • The Current State of (free) Static Analysis
  • Stop Teaching C
  • Applying functional programming in code design

 

Grill the Committee with Jon KalbChandler CarruthMarshall ClowLawrence CrowlGabriel Dos ReisRichard SmithBjarne StroustrupHerb SutterVille Voutilainen and Michael Wong

What would you like to know about how the C++ Standard happens?

The panel is made up of members of the C++ Standards Committee and the audience asks the questions.


C++ on the Web: ponies for developers without pwn’ing users by JF Bastien, Jest-in-Time Compiler, Google

Is it possible to write apps in C++ that run in the browser with native code speed? Yes. Can you do this without the security problems associated with running native code downloaded from the net? Yes and yes. Come to this session to learn how.

We'll showcase some resource-intensive applications that have been compiled to run in the browser. These applications run as fast as native code with access to cornerstone native programming APIs—modern C++ STL, OpenGL, files and processes with full access to C++’s concurrency and parallelism—all in an architecture- and OS-agnostic packaging. Then, we'll describe how we deliver native code on the web securely, so developers get their C++ ponies and users don’t get pwn’d. We’ll also touch on the fuzzing, code randomization, and sandboxing that keep the billions of web users safe.


Implementation of a component-based entity system in modern C++14 by Vittorio Romeo

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.


The Current State of (free) Static Analysis by Jason Turner

We will discuss the currently available free static analysis software available for C++. What kinds of errors can these tools catch? What kind do they miss? Why static analysis should be a part of your normal build process.


Stop Teaching C by Kate Gregory, Partner, Gregory Consulting

To this day most people who set out to help others learn C++ start with "introduction to C" material. I think this actively contributes to bad C++ code in the world. For the past few years I've been teaching C++ (and making suggestions to folks who intend to teach themselves) in an entirely different way. No char* strings, no strlen, strcmp, strcpy, no printf, and no [] arrays. Pointers introduced very late. References before pointers, and polymorphism with references rather than with pointers. Smart pointers as the default pointer with raw pointers (whether from new or &) reserved for times they're needed. Drawing on the Standard Library sooner rather than later, and writing modern C++ from lesson 1.

In this session I want to talk about the specific advantages of teaching C++ this way – a way that’s very different from the way you almost certainly learned the language. You’ll be pleasantly surprised to see what you get to leave for later or never cover at all, what bad habits you don't later need to correct, what complicated concepts actually become accessible to beginners, and how you spend a lot less time dictating magic spells you can't explain yet, and more showing someone a comprehensive, sensible, and understandable language.

You don't have to be a trainer to come to this session. If you ever mentor other developers and show them your C++ code, if you ever help somebody choose a book or a course or other material to learn from, or even if you occasionally feel bad that you work in a language that's hard to learn, come and see how one philosophical shift can turn that very same language into one that's actually pretty easy to learn!


Applying functional programming in code design by Michał Dominiak, Software Engineer, Nokia Networks

At first glance C++ doesn't seem to be a language that lets you do much functional programming, not to mention actually focusing the structure of your application around that. But that is changing, together with the general approach to program in the language. We do care about const-correctness; when writing code meant to run concurrently, we want to avoid locks, so we do our best not to share mutable state (I'm here to argue that uniquely owned mutable state is perfectly fine). With that mindset, we can try to design our applications in a functional way.

This talk will focus not only on things typically associated with functional programming, but also on the following in the context of C++: * Making functions pure (as long as it makes sense). * Using functional data structures. * Designing control flows that don't lead to shared state. * Composability and benefiting from laziness. * Striving for generic code. * Noticing patterns and turning them into abstractions. * Functors and monads as "patterns". * An example application built around those principles.

CppCon 2015 Program Highlights, 14 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The following interrelated CppCon 2015 talks tackle interesting issues and more.

In this post:

  • An Overview on Encryption in C++
  • Demystifying Floating Point Numbers
  • What is Open Source, and Why Should You Care?
  • Live lock-free or deadlock (practical Lock-free programming), Part I, and Part II
  • Programming with less effort in C++
  • Functional Design Explained

 

An Overview on Encryption in C++ by Jens Weller, Meeting C++, Meeting C++

Encryption has become a very important topic for C++ developers and this session will serve as an introduction and overview this topic. I will present an overview on the popular encryption libraries cryptopp, botan and libsodium, and give you an update on the popular encryption algorithms of AES and RSA, plus why cryptoboxes can be a great help.


Demystifying Floating Point Numbers by John Farrier, Sr. Lead Technologist, Booz Allen Hamilton

Every day we develop software that relies on math while we often overlook the importance of understanding the implications of using our IEEE floats. From the often cited “floating point error” to unstable algorithms, this talk will explain the importance of floats, understanding their storage, the impact of the IEEE floats on math, and designing algorithms better. Finally, the talk will conclude with a quick case study of storing time for games and simulations.


What is Open Source, and Why Should You Care? by Kevin P. Fleming, Member of the CTO Office, Bloomberg

In this session, Kevin will present a condensed history of open source software: its origins, motivations and effect on the world of software development. He'll then talk about open source *beyond* software, and various ways that students can get involved in open source projects to develop useful (and marketable) skills. These are skills which are not taught in most degree programs, but are very valuable for jobs in scientific and engineering disciplines.


Live lock-free or deadlock (practical Lock-free programming), Part I, and Part II by Fedor Pikus, Chief Scientist, Mentor Graphics

Part I: Introduction to lock-free programming. We will cover the fundamentals of lock-free vs lock-based programming, explore the reasons to write lock-free programs as well as the reasons not to. We will learn, or be reminded, of the basic tools of lock-free programming and consider few simple examples. To make sure you stay on for part II, we will try something beyond the simple examples, for example, a lock-free list, just to see how insanely complex the problems can get.

Part II: having been burned on the complexities of generic lock-free algorithms in part I, we take a more practical approach: assuming we are not all writing STL, what limitations can we really live with? Turns out that there are some inherent limitations imposed by the nature of the concurrent problem: is here really such a thing as “concurrent queue” (yes, sort of) and we can take advantages of these limitations (what an idea, concurrency actually makes something easier!) Then there are practical limitations that most application programmers can accept: is there really such a thing as a “lock-free queue” (may be, and you don’t need it). We will explore practical examples of (mostly) lock-free data structures, with actual implementations and performance measurements. Even if the specific limitations and simplifying assumptions used in this talk do not apply to your problem, the main idea to take away is how to find such assumptions and take advantage of them, because, chances are, you can use lock-free techniques and write code that works for you and is much simpler than what you learned before.


Programming with less effort in C++ by Ferreira Da Costa and Sylvain JUBERTIE

The C++ language and libraries propose different ways to implement codes. For example, using explicit loops or STL algorithms to traverse containers and process data. C++11&14 bring also new features to the C++ language aimed at simplifying the writing of codes. But what is the gain we can expect in term of development effort when using these different possibilities and features ? or, as a developer may ask himself: Is it viable for me to spend some time learning new C++ libraries or standards to provide less effort/spend less time on my future codes ?

Before answering these questions, we must give a definition of the development effort, and define a way to measure it. Thus, we first propose to describe existing software metrics, from the simple Single Line Of Code (SLOC) to the more complex Halstead metrics, then to implement them in an automatic tool based on Clang tools, and finally to apply them on several codes to compare their respective development efforts.

First results show that using modern C++ features like auto, decltype and lambdas help to dramatically reduce the development effort. These results may help to convince developers to use new C++ features, or to port their codes from old standards to new ones, or even switch from other languages to C++ !


Functional Design Explained by David Sankel, Untitled, Stellar Science

An oft-cited benefit of learning a functional language is that it changes one's approach to solving problems for the better. The functional approach has such a strict emphasis on simplistic and highly composable solutions that an otherwise varied landscape of solution possibilities narrows down to only a few novel options.

This talk introduces functional design and showcases its application to several real-world problems. It will briefly cover denotational semantics and several math-based programming abstractions. Finally, the talk will conclude with a comparison of functional solutions to the results more traditional design methodologies.

No prior knowledge of functional programming or functional programming languages is required for this talk. All the examples make use of the C++ programming language.

CppCon 2015 Program Highlights, 13 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The current processors have many cores. To use them well and safely for concurrent programming is not always easy.

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • Racing the file system
  • Transactional Memory in Practice
  • Single Threaded Functional to Massively Parellel Stochastic with AMP
  • How to make your data structures wait-free for reads
  • Parallel Program Execution using Work Stealing
  • Executors for C++ - A Long Story

 

Racing the file system by Niall Douglas, Consultant for Hire, ned Productions Ltd

Almost every programmer knows about and fears race conditions on memory where one strand of execution may concurrently update data in use by another strand of execution, leading to an inconsistent and usually dangerous inconsistent read of program state. Almost every programmer therefore is aware of mutexes, memory ordering, semaphores and the other techniques used to serialise access to memory.

Interestingly, most programmers are but vaguely aware of potential race conditions on the filing system, and as a result write code which assumes that the filing system does not suddenly change out from underneath you when you are working on it. This assumption of a static filing system introduces many potential security bugs never mind ways of crashing your program, and of course creating data loss and corruption.

This workshop will cover some of the ways in which filing system races can confound, and what portable idioms and patterns you should employ to prevent misoperation, even across networked Samba shares. Finally, an introduction of the proposed Boost library AFIO will be made which can help application developers writing filing system race free code portably.


Transactional Memory in Practice by Brett Hall, Principal Software Engineer, Wyatt Technology

Transactional memory has been held up as a panacea for concurrent programming in some quarters. The C++ standardization committee is even looking at including it in the standard. But is it really a panacea? Has anyone used it in a shipping piece of software? There are scattered examples, mostly from the high-performance and super-computing realms. On the other end of the spectrum, at Wyatt Technology we've been using transactional memory in a desktop application that does data acquisition and analysis for the light-scattering instruments we build. That application is called Dynamics and we've been using a software transactional memory system in it for four years now. This talk will detail how our system works, how well it worked, and what pitfalls we've run into. Prior experience with transactional memory will not be assumed, though it would help if you have experience programming threads with locks and an open mind about alternatives and why we're looking for them.


Single Threaded Functional to Massively Parellel Stochastic with AMP by Kevin Carpenter, Software Engineer, Carpenter Systems LLC

Come with us as we take a legacy MFC financial modelling application that is largely function in design and transform it to something new. We will take a portion of this large financial simulation application and change its single threaded ways into parallel processing stochastic model. Transforming single class’s with a hodge-podge of functions into an object oriented parallel design using c++ amp and implementing Stochastic modelling methodology. Aside from focusing on the key portions of converting functional single threaded code to a parallel design we will also touch on some of the details of financial modeling for interest rate risk.


How to make your data structures wait-free for reads by Pedro Ramalhete, Cisco

In this talk we will describe a new concurrency control algorithm with Blocking write operations and Wait-Free Population Oblivious read operations, which we named the Left-Right algorithm.

We will show a new pattern where this algorithm is applied, which requires using two instances of a given resource, and can be used for any data structure, allowing concurrent access to it similarly to a Reader-Writer lock, but in a non-blocking manner for reads, including safe memory management without needing a Garbage Collector.


Parallel Program Execution using Work Stealing by Pablo Halpern, Mr, Intel Corp.

If you've used a C++ parallel-programming system in the last decade, you've probably run across the term "work stealing." Work stealing is a scheduling strategy that automatically balances a parallel workload among available CPUs in a multi-core computer, using computation resources with theoretical utilization that is nearly optimal. Modern C++ parallel template libraries such as Intel(R)'s TBB or Microsoft*'s PPL and language extensions such as Intel(R) Cilk(tm) Plus or OpenMP tasks are implemented using work-stealing runtime libraries.

Most C++ programmers pride themselves on understanding how their programs execute on the underlying machine. Yet, when it comes to parallel programming, many programmers mistakenly believe that if you understand threads, then you understand parallel runtime libraries. In this talk, we'll investigate how work-stealing applies to the semantics of a parallel C++ program. We'll look at the theoretical underpinnings of work-stealing, now it achieves near optimal machine utilization, and a bit about how it's implemented. In the process, we'll discover some pit-falls and how to avoid them. You should leave this talk with a deeper appreciation of how parallel software runs on real systems.

Previous experience with parallel programming is helpful but not required. A medium level of expertise in C++ is assumed.


Executors for C++ - A Long Story by Detlef Vollmann

Executors will be a base building block in C++ for asynchronous, concurrent and parallel work. The job of an executor is simple: run the tasks that are posted. So the first proposals for executors in C++ had a very simple interface. However, being a building block, the executor should provide an interface that's useful for all kind of higher level abstractions and needs to work together with different types of concurrency, like co-operative multi-tasking or GPU like hardware. This presentation will look at the evolution of the executor proposals for C++ and what they'll provide for normal application programmers.

CoderPower exclusive C++ Back to School Challenge

Summer is almost over, meaning it’s time to return to reality. To help you reconnect with coding and open a new season of series, CoderPower offers an exclusive opportunity to discover the innovative interface of the new HP all-in-one computer, the HP Sprout.

Untill Oct. 26th, you can get to know the Sprout SDK in an environment that will show you, step-by-step, how easy and fun coding on Sprout really is. 

Your mission: follow the three warm-ups made by the @CoderPower team, that will teach you how to return the SDK version number and to use the monitor GUID as well as the touch mat. Do the complementary exercises and level up your skills! Write, copy and paste your code in the panel on the right side of the screen. The technology is all along simulated by a mocking system that send you back an answer. If it is the correct one, well done! If not, use your super-coder abilities to spot your mistake and try again!

Then enter the weekly challenges, for examples: “Show the mat keyboard” or “Extract Outline”. For starters, 2 challenges will be released the two first weeks and one challenge per week until Oct. 26th. So you have to perform well in 10 challenges to be the best C++ coder!

The rules are easy: You have to code against the clock. Quicker you are, more points you get. Points are cumulative between challenges and at the end of the challenge, the contestant with the biggest score on the leaderboard will win a HP Sprout. Be aware that you can only take a challenge once! Do your best on the first try!

To get started, click here http://bit.ly/1KhxOw9

CppCon 2015: More Lightning Talks -- Kate Gregory

cppcon-009.PNGReminder: The CppCon regular registration rate ends in 2 1/2 days! After that late registration will still be available.

CppCon 2015: More Lightning Talks

by Kate Gregory

From the announcement:

One of the big surprises last year at CppCon was the tremendous response to the lightning talks. People kept submitting them, and we just kept adding sessions. This year, we’re adding those sessions in advance as the submissions come in, so that you can plan to attend. (And yes, you can still submit a talk. We have time slots we can hold more lightning talk sessions in.) We’ve just added two more sessions – Tuesday lunch and Wednesday morning – to accommodate the submissions already received. You’ll see the lightning talk sessions in yellow on the program. The abstract is vague, and it’s not going to get less vague. You don’t know precisely what you’re going to get until you show up.

What roughly will you get? A number of different talks – some funny, some very technical, some personal, some inspirational, some that will make your grateful you have the job you do and not the speaker’s job. Some will be 5 minutes long and some 15 minutes long. A few might be followups to something that’s already happened. Others might be a way to invite you to something that hasn’t happened yet. Some will be the very first public speaking that speaker has ever done, and some will be a chance to let your hair down with a speaker you’ve seen being serious many times before. Some might not interest you, but that’s ok – they’re short, you can be bored for 5 or 15 minutes, and then there will be a different one. They’re little bite size goodies, and for many of us they were a very enjoyable highlight of the conference. Add some to your schedule now, and be prepared to get up a little early or stay on site a little late to get the full benefit of your time here!

Posted in News

CppCon 2015 Program Highlights, 12 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

C++, it is also a language that we like to discover and master always more.

The following interrelated CppCon 2015 talks tackle these issues and more (part 3).

In this post:

  • Generic Lambdas from Scratch
  • Large Scale C++ With Modules: What You Should Know
  • Shared_Future from Scratch
  • Comparison is not simple, but it can be simpler
  • The Importance of Being const
  • Intro to the C++ Object Model

 

Generic Lambdas from Scratch by Arthur O'Dwyer, software engineer, Mixpanel

Lambdas (even those mysterious generic lambdas) are just syntactic sugar atop constructs that are perfectly understandable when approached from the right direction.

We'll start with the implementation of C-style functions, then move to overloading, function templates, non-static member functions, C++11 lambdas, and then demystify C++14 generic ("auto") lambdas. Finally, we'll detour into the implementations of std::function and std::bind to show how they're different from lambdas.


Large Scale C++ With Modules: What You Should Know by Gabriel Dos Reis, Principal Software Development Engineer, Microsoft

To be completed.


Shared_Future from Scratch by Arthur O'Dwyer, software engineer, Mixpanel

The contents of header are probably still a bit mysterious to most people. Sure, we know that setting the value of a promise causes the corresponding future to resolve; but how does that happen behind the scenes in a way that allows us to move futures around? How are we going to implement the new features in the Concurrency TS, such as .then() and .when_all()? How (if at all) do futures interact with std::thread, std::async, and "executors"?

We'll present an extremely simplified implementation of futures and shared_futures, without the template metaprogramming that comes along with future and future and so on, but showing all the pointers and synchronization primitives.


Comparison is not simple, but it can be simpler by Lawrence Crowl

The standard's algorithms typically require a 'strict weak ordering'. I will explain what this really means and show that even simple uses of sort can have latent failures. Programmers can avoid the problems today with a bit of work. Changes to the standard will reduce errors and programming effort.


The Importance of Being const by Richard Powell, Audio Software Engineer

Why do we use const? It helps the compiler enforce program invariants, find trivial bugs, and generally makes code better. But with C++11 has an extended meaning, specifically in regards to multi-threaded code.

This talk will be an intro to the const keyword and what it means to declare objects, pointers and member functions as const. We will also explore some subtle issues encountered with const, mutable, and multithreaded code.


Intro to the C++ Object Model by Richard Powell, Audio Software Engineer

This talk is to help you learn about how objects are represented in C++. I find it very helpful to have a mental model of how objects exist in the program memory space to understand how my code operates within program execution.

CppCon 2015 Program Highlights, 11 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

C++, it is also a language that we like to discover and master always more.

The following interrelated CppCon 2015 talks tackle these issues and more (part 2).

In this post:

  • Concurrency TS: The Editor's Report
  • `for_each_argument` explained and expanded
  • std::allocator Is to Allocation what std::vector Is to Vexation
  • <functional>: What's New, And Proper Usage
  • Type Traits - what are they and why should I use them?

 

Concurrency TS: The Editor's Report by Artur Laksberg, Software Engineer, Microsoft

In this presentation we will talk about the new C++ concurrency features that have been included in the Concurrency Technical Specification.

The TS should be of interest to anyone writing concurrent code in C++. The proposal includes improved futures for wait-free composition of asynchronous operations (including their relationship with C++ 'await'), new synchronization constructs as well as atomic smart pointers.


`for_each_argument` explained and expanded by Vittorio Romeo

During January 2015, Sean Parent posted a very interesting short piece of code on Twitter. The code iteratively iterates at compile-time over any number of function arguments, forwarding them one by one to a callable object.

How does this code work? What are the possible use cases? Can we make it even more generic and useful?

My talk answers all of the questions above, using independently compiled chronologically sequential code segments that show the audience the analysis and improvement process of `for_each_argument`.


std::allocator Is to Allocation what std::vector Is to Vexation by Andrei Alexandrescu, Founder, D Language Foundation

std::allocator has an inglorious past, murky present, and cheerless future. STL introduced allocators as a stop gap for the now antiquated segmented memory models of the 1990s. Their design was limited and in many ways wasn't even aiming at helping allocation that much. Because allocators were there, they simply continued being there, up to the point they became impossible to either uproot or make work, in spite of valiant effort spent by the community.

But this talk aims at spending less time on poking criticism at std::allocator and more on actually defining allocator APIs that work.

Scalable, high-performance memory allocation is a topic of increasing importance in today's demanding applications. For such, std::allocator simply doesn't work. This talk discusses the full design of a memory allocator created from first principles. It is generic, componentized, and composable for supporting application-specific allocation patterns.


<functional>: What's New, And Proper Usage by Stephan T. Lavavej, Senior Software Engineer, Microsoft

<functional> gained lots of machinery in C++11, with further changes in C++14 and C++17. This talk will cover what's new in 11/14/17, focusing on how to use it properly. For example, you've probably used std::function, but do you know the criteria for activating the Small Functor Optimization? (It's not just being small!) We'll also look at bind(), mem_fn(), C++17's invoke(), and more.


Type Traits - what are they and why should I use them? by Marshall Clow, Qualcomm

In this talk, I will answer the questions, "What are type traits?" and "Why are type traits useful?", along with some examples of why when when they should be used.