Mountain View: Named Arguments from Scratch

This is a past event

90 people went

Location image of event venue

Details

Given:

void foo(int size, int value);

Wouldn’t it be great to be able to write:

foo("value" = 3, "size" = 10);

We will explore how we can do something like this with C++17. This will be a live coding session where we start from the basic idea of what we want to do and build up a small library that accomplishes this goal. We will outline some simply but powerful programming techniques and give a brief outline on how to use Boost.Hana (http://boostorg.github.io/hana), a powerful library for metaprogramming. And while you may not have a need for named arguments in your code, learning and thinking about how to bend C++ a little may inspire you to think about how to tackle other challenges you face.

Richard Powell started using C++ ten years ago to write a psychoacoustic audio encoder/decoder and has continued to explore how to make software that unlocks the potential of hardware to bring amazing applications to life. He graduated from UC Berkeley with a BS in Electrical Engineering and Computer Science, and worked throughout the Bay Area for the past 15 years. He enjoys teaching and learning about C++ and programming.