July 2018

CppCon 2017: Agent based class design--Odin Holmes

Have you registered for CppCon 2018 in September? Early bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

Agent based class design

by Odin Holmes

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Abstracting a set of functionalities into a class which provides a higher level interface often requires tough design decisions. Users who do not have the exact requirements for which the abstraction is optimized will suffer a syntactic or run time overhead as a result. Alexandrescu's famous "policy-based design" provides a mechanism to allow the user to extend and customize an existing abstraction in order to fine-tune its functionality for many different use cases. This is however limited to use cases where each policy more or less represents a compile time strategy pattern.

Alas, not everything is a strategy pattern. In this talk I will explore the viability of a more agent-pattern-like paradigm where each policy knows its requirements and publishes its capabilities. In this paradigm, glue code connecting any valid set of policies is automatically generated using template metaprogramming. This allows much more powerful customizations while maintaining static linkage.

CppCon keynote: Simplicity, not just for beginners -- Kate Gregory

KateGregory-300x300.jpegNote: Five days left to register for CppCon 2018 at the Early Bird discounted rate.

Another keynote announcement, another reason not to miss CppCon 2018 this September:

CppCon 2018 Keynote: Simplicity: Not Just for Beginners (Kate Gregory)

From the announcement:

In this talk I’ll spend a little time on why simpler is better, and why we resist simplicity. Then I’ll provide some specific approaches that are likely to make your code simpler, and discuss what you need to know and do in order to consistently write simpler code and reap the benefits of that simplicity.

If you’re not sure what CppCon is like, here are sample attendee quotes from a previous CppCon that came up randomly on the CppCon site this morning:

“The best place to meet other C++ users and learn about the problems they have faced and solved.” “Just go - you won't reget it!”

The CppCon Early Bird discounted ticket rate is available for the rest of this week. Register here for CppCon 2018, Sep 23-29!

CppCon 2017: Concurrency, Parallelism and Coroutines--Anthony Williams

Have you registered for CppCon 2018 in September? Early bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:

Concurrency, Parallelism and Coroutines

by Anthony Williams

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

C++17 is adding parallel overloads of most of the Standard Library algorithms. There is a TS for Concurrency in C++ already published, and a TS for Coroutines in C++ and a second TS for Concurrency in C++ in the works.

What does all this mean for programmers? How are they all related? How do coroutines help with parallelism?

This session will attempt to answer these questions and more. We will look at the implementation of parallel algorithms, and how continuations, coroutines and work-stealing fit together. We will also look at how this meshes with the Grand Unified Executors Proposal, and how you will be able to take advantage of all this as an application developer.

Parallel STL And Filesystem: Files Word Count Example--Bartlomiej Filipek

Now with some more numbers.

Parallel STL And Filesystem: Files Word Count Example

by Bartlomiej Filipek

From the article:

Last week you might have read about a few examples of parallel algorithms. Today I have one more application that combines the ideas from the previous post.

We’ll use parallel algorithms and the standard filesystem to count words in all text files in a given directory...

Functions of Variants are Covariant--Alfredo Correa

It's varying!

Functions of Variants are Covariant

by Alfredo Correa

From the article:

Sum types have a range of values that is the sum of the ranges of its parts. std::variant is the model representation of sum types in C++.

For example std::variant can hold an integer value (int state) or a double value (double state). The use of variant types provides support for polymorphism while maintaining value semantics.

There are only a few intrinsic functions that can be applied directly to an std::variant instance in C++; basically, only functions that probe or extract their current type state and value. Simple C++ functions over its component states cannot be applied directly to the variant since the type information needs to be probed before calling the corresponding function over the correct type.

Specific C++ functions can be applied through visitors. However, standard visitors are static and non-covariant, stopping polymorphism from propagating through function application.

A basic explanation of variants and their visitors can be found here.

Trip report: Summer ISO C++ standards meeting (Rapperswil) -- Herb Sutter

Contracts, concepts, and C++20, oh my!

Trip report: Summer ISO C++ standards meeting (Rapperswil)

by Herb Sutter

From the article:

Top news: Contracts adopted for C++20

... In my opinion, contracts is the most impactful feature of C++20 so far, and arguably the most impactful feature we have added to C++ since C++11. That statement might surprise you, so let me elaborate why I think so...

CppCon: Spectre keynote, Early Bird rate available until Saturday

Note: Six days left to register for CppCon 2018 at the Early Bird discounted rate.

From the CppCon blog, one of this year's keynotes is on one of the hottest programming language topics of the year:

CppCon 2018 Plenary: Spectre: Secrets, Side-Channels, Sandboxes, and Security by Chandler Carruth

There will also be a followup panel of industry experts who have helped lead the software response to this problem. From the announcement:

Chandler, who leads the C++ and LLVM teams at Google ... is one of the lead engineers within Google and across the industry working to respond to these developments.

From his talk’s description:

The discovery of speculative execution side-channel attacks (called “Spectre”) fundamentally changes the security model of every modern superscalar microprocessor. Extracting secret data (credit cards, cryptographic keys) through side-channels is not new and has challenged the cryptographic community for decades. However, speculative execution attack techniques have fundamentally altered the ease and applicability of side-channels: far more code is impacted by these attacks and they can more reliably be weaponized. Responding to these issues has impacted CPU design, compiler design, library design, sandbox techniques and even the C++ programming language and standard.

This talk will explain how these kinds of attacks work at a high level and provide a clear set of terminology to describe these classes of vulnerabilities and attacks. It will show how the different variants work at the low level of modern hardware to give a detailed and precise understanding of the mechanics involved on CPUs today.

In addition to his plenary address, Chandler will participate in a panel discussion with other experts from across the industry who have helped lead this security incident response.
 

If you’re not sure what CppCon is like, here’s a sample attendee quote from a previous CppCon that came up randomly on the CppCon home page this morning:

“If you want to meet awesome people, spend a week in a fantastic city, and have your mind-blown by incredible speakers then look no further than CppCon. It is THAT good.”

The CppCon Early Bird discounted ticket rate is available for one more week. Register here for CppCon 2018, Sep 23-29!

2018-06 post-Rapperswil mailing available

The full 2018-06 mailing of new standards papers is now available.

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup Disposition
2018-06 post-Rapperswil
N4751 WG21 pre-Rapperswil telecon minutes Nina Dinka Ranns 2018-05-25 2018-06 WG21
N4752 Responses to National Body Comments for ISO/IEC PDTS 19750, C++ Extensions for Parallelism Version 2 Bryce Adelstein Lelbach 2018-06-08 2018-06 WG21
N4753 WG21 2018-06 Rapperswil Minutes Nina Dinka Ranns 2018-12-06 2018-06 WG21
N4754 Rapperswil 2018 LEWG Summary Titus Winters 2018-06-12 2018-06 WG21
N4755 Working Draft, C++ Extensions for Parallelism Version 2 Jared Hoberock 2018-06-24 2018-06 N4744 WG21
N4756 Parallelism TS Editor’s Report, post-Rapperswil mailing Jared Hoberock 2018-06-26 2018-06 WG21
N4757 Programming Languages - C++ Extensions for Parallelism Version 2 Jared Hoberock 2018-06-24 2018-06 WG21
N4758 Working Draft, C++ Extensions for Library Fundamentals, Version 3 Thomas Köppe 2018-06-25 2018-06 N4617 WG21
N4759 Editor’s Report: C++ Extensions for Library Fundamentals, Version 3 Thomas Köppe 2018-06-25 2018-06 WG21
N4760 Working Draft, C++ Extensions for Coroutines Gor Nishanov 2018-06-24 2018-06 N4736 WG21
N4761 Editor's report for the Coroutines TS Gor Nishanov 2018-06-24 2018-06 WG21
P0009r7 mdspan: A Non-Owning Multidimensional Array Reference H. Carter Edwards, Bryce Adelstein Lelbach, Daniel Sunderland, David Hollman, Christian Trott, Mauro Bianco, Ben Sander, Athanasios Iliopoulos, John Michopoulos, Mark Hoemmen 2018-06-24 2018-06 P0009r6 Library
P0019r8 Atomic Ref Daniel Sunderland, H. Carter Edwards, Hans Boehm, Olivier Giroux, Mark Hoemmen, David Hollman, Bryce Adelstein Lelbach, Jens Maurer 2018-06-07 2018-06 P0019r7 Library Adopted 2018-06
P0267r8 A Proposal to Add 2D Graphics Rendering and Display to C++ Michael B. McLaughlin, Herb Sutter, Jason Zink, Guy Davidson, Michael Kazakov 2018-06-26 2018-06 P0267r7 WG21
P0323r7 std::expected Vicente Botet, JF Bastien 2018-06-22 2018-06 P0323r6 Library
P0357R2 'reference_wrapper' for incomplete types Tomasz Kamiński, Stephan T. Lavavej, Alisdair Meredith 2018-06-10 2018-06 P0357R1 Library
P0388R3 Permit conversions to arrays of unknown bound Robert Haberlach 2018-06-24 2018-06 P0388R2 Core
P0458R2 Checking for Existence of an Element in Associative Containers Mikhail Maltsev 2018-06-06 2018-06 P0458R1 Library Adopted 2018-06
P0475R1 LWG 2511: guaranteed copy elision for piecewise construction Jonathan Wakely 2018-06-05 2018-06 P0475R0 Library Adopted 2018-06
P0476R2 Bit-casting object representations JF Bastien 2017-11-10 2018-06 P0476R1 Library Adopted 2018-06
P0482R4 char8_t: A type for UTF-8 characters and strings Tom Honermann 2018-06-16 2018-06 P0482R3 Library
P0483R2 static_vector Gonzalo Brito Gadeschi 2018-06-25 2018-06 P0483R1 Library
P0528R3 The Curious Case of Padding Bits, Featuring Atomic Compare-and-Exchange JF Bastien, Michael Spencer 2018-06-07 2018-06 P0528R2 Core Adopted 2018-06
P0542R5 Support for contract based programming in C++ J. Daniel Garcia 2018-06-08 2018-06 P0542R4 Core Adopted 2018-06
P0556R3 Integral power-of-2 operations Jens Maurer 2018-06-06 2018-06 P0556R2 Library Adopted 2018-06
P0602R3 variant and optional should propagate copy/move triviality Zhihao Yuan 2018-06-13 2018-06 P0602R2 Library
P0619R4 Reviewing Deprecated Facilities of C++17 for C++20 Alisdair Meredith, Alisdair Meredith, Tomasz Kamiński 2018-06-08 2018-06 P0619R3 Core, Library Adopted 2018-06
P0631R3 Math Constants Lev Minkovsky, John McFarlane 2018-06-08 2018-06 P0631R2 SG6, Library Evolution
P0646R1 Improving the Return Value of Erase-Like Algorithms I: list/forward list Marc Mutz 2018-06-08 2018-06 P0646R0 Library Adopted 2018-06
P0660R3 A Cooperatively Interruptible Joining Thread Nicolai Josuttis, Herb Sutter, Anthony Williams 2018-06-06 2018-06 P0660R2 SG1, Library Evolution, Library
P0664R4 C++ Coroutine TS Issues Gor Nishanov 2018-06-07 2018-06 P0664R3 Evolution, Core, Library Evolution Adopted 2018-06
P0664R5 C++ Coroutine TS Issues Gor Nishanov 2018-06-24 2018-06 P0664R4 Core
P0668R4 Revising the C++ memory model Hans-J. Boehm, Olivier Giroux, Viktor Vafeiades 2018-06-24 2018-06 P0668R3 Core, Library
P0670R4 Function reflection Matúš Chochlík, Axel Naumann, David Sankel 2018-06-08 2018-06 P0670R3 Core, Library Adopted 2018-06
P0709R1 Zero-overhead deterministic exceptions: Throwing values Herb Sutter 2018-06-20 2018-06 P0709R0 Evolution, Library Evolution
P0722R3 Efficient sized delete for variable sized classes Richard Smith, Andrew Hunter 2018-03-17 2018-06 P0722R2 Core, Library Adopted 2018-06
P0732R2 Class Types in Non-Type Template Parameters Jeff Snyder, Louis Dionne 2018-06-06 2018-06 P0732R1 Evolution Adopted 2018-06
P0758R1 Implicit conversion traits and utility functions Daniel Krügler 2018-06-06 2018-06 P0758R0 Library Adopted 2018-06
P0759R1 fpos requirements Daniel Krügler 2018-06-04 2018-06 P0759R0 Library Adopted 2018-06
P0769R2 Add shift to <algorithm> Dan Raviv 2018-06-06 2018-06 P0769R1 Library Adopted 2018-06
P0771R0 std::function move operations should be noexcept Nevin Liber 2017-10-16 2018-06 Library
P0784R4 More constexpr containers Louis Dionne, Richard Smith, Nina Ranns, Daveed Vandevoorde 2018-06-22 2018-06 P0784R3 Core, Library
P0788R3 Standard Library Specification in a Concepts and Contracts World Walter E. Brown 2018-06-07 2018-06 P0788R2 Library Adopted 2018-06
P0805R2 Comparing Containers Marshall Clow 2018-06-22 2018-06 P0805R1 Library
P0806R2 Deprecate implicit capture of this via [=] Thomas Köppe 2018-06-04 2018-06 P0806R1 Core Adopted 2018-06
P0820R4 Feedback on P0214 Tim Shen, Matthias Kretz 2018-06-08 2018-06 P0820R3 Library Adopted 2018-06
P0828R1 Elastic Integers John McFarlane 2018-06-25 2018-06 P0828R0 SG6, SG12, SG14
P0876R3 fiber_handle - fibers without scheduler Oliver Kowalke, Nat Goodspeed 2018-06-08 2018-06 P0876R2 Library Evolution
P0883R1 Fixing Atomic Initialization Nicolai Josuttis 2018-06-05 2018-06 P0883R0 SG1, Library Evolution, Library
P0887R1 The identity metafunction Timur Doumler 2018-03-18 2018-06 P0887R0 Library Adopted 2018-06
P0892R2 explicit(bool) Barry Revzin, Stephan T. Lavavej 2018-06-08 2018-06 P0892R1 Core, Library Adopted 2018-06
P0896R2 The One Ranges Proposal Eric Niebler, Casey Carter, Christopher Di Bella 2018-06-25 2018-06 P0896R1 Library Evolution, Library
P0898R3 Standard Library Concepts Casey Carter, Eric Niebler 2018-06-08 2018-06 P0898R2 Library Adopted 2018-06
P0907R3 Signed Integers are Two’s Complement JF Bastien 2018-06-10 2018-06 P0907R2 Core
P0912R2 Merge Coroutines TS into C++20 working draft Gor Nishanov 2018-06-08 2018-06 P0912R1 WG21 Adopted 2018-06
P0919R2 Heterogeneous lookup for unordered containers Mateusz Pusz 2018-06-11 2018-06 P0919R1 Library
P0921R2 Standard Library Compatibility Titus Winters, Ashley Hedberg 2018-05-06 2018-06 P0921R1 Evolution, Library Evolution
P0927R1 Towards A (Lazy) Forwarding Mechanism for C++ James Dennett, Geoff Romer 2018-05-16 2018-06 P0927R0 Evolution
P0929R2 Checking for abstract class types Jens Maurer 2018-06-06 2018-06 P0929R1 Core Adopted 2018-06
P0941R2 Integrating feature-test macros into the C++ WD Ville Voutilainen, Jonathan Wakely 2018-06-08 2018-06 P0941R1 Core, Library Adopted 2018-06
P0964R2 Finding the right set of traits for simd<T> Matthias Kretz 2018-06-07 2018-06 P0964R1 Library Evolution Adopted 2018-06
P0985R1 LWG Chair post-meeting report Marshall Clow 2018-06-19 2018-06 P0985R0 WG21
P0995R1 Improving atomic_flag JF Bastien, Olivier Giroux, Andrew Hunter 2018-06-22 2018-06 P0995R0 Library
P1000R1 C++ IS schedule Herb Sutter 2018-06-21 2018-06 P1000R0 WG21
P1007R1 std::assume_aligned Timur Doumler, Chandler Carruth 2018-06-25 2018-06 P1007R0 Library
P1008R1 Prohibit aggregates with user-declared constructors Timur Doumler, Arthur O’Dwyer, Richard Smith, Howard E. Hinnant, Nicolai Josuttis 2018-06-08 2018-06 P1008R0 Evolution, Core Adopted 2018-06
P1013R1 Explicit concept expressions Thomas Köppe, Hubert S.K. Tong 2018-06-10 2018-06 P1013R0 WG21
P1018R1 Evolution status after Rapperswil 2018 Ville Voutilainen 2018-06-09 2018-06 P1018R0 WG21
P1023R0 constexpr comparison operators for std::array Tristan Brindle 2018-05-06 2018-06 Library Evolution Adopted 2018-06
P1024R1 Usability Enhancements for std::span Tristan Brindle 2018-06-24 2018-06 P1024R0 Library Evolution
P1025R1 Update The Reference To The Unicode Standard Steve Downey, JeanHeyd Meneide, Martinho Fernandes 2018-06-07 2018-06 P1025R0 SG16, Core, Library Adopted 2018-06
P1030R1 std::filesystem::path_view Niall Douglas 2018-06-18 2018-06 P1030R0 Library Evolution
P1033R1 Rangify the uninitialised memory algorithms! Casey Carter, Christopher Di Bella 2018-06-25 2018-06 P1033R0 Library Evolution
P1040R1 std::embed JeanHeyd Meneide 2018-06-06 2018-06 P1040R0 Evolution, Library Evolution
P1041R1 Make char16_t/char32_t string literals be UTF-16/32 R. Martinho Fernandes 2018-06-15 2018-06 P1041R0 Evolution
P1042R1 __VA_OPT__ wording clarifications Hubert S.K. Tong 2018-06-04 2018-06 P1042R0 Core Adopted 2018-06
P1053R1 Future-proofing continuations for executors Lee Howes, Eric Niebler 2018-06-24 2018-06 P1053R0 SG1, Library Evolution
P1064R0 Allowing Virtual Function Calls in Constant Expressions Peter Dimov, Vassil Vassilev 2018-05-04 2018-06 Evolution Adopted 2018-06
P1073R1 constexpr! functions Richard Smith, Andrew Sutton, Daveed Vandevoorde 2018-06-22 2018-06 P1073R0 Core
P1076R1 Editorial clause reorganization Jens Maurer 2018-06-23 2018-06 P1076R0 Core, Library
P1082R0 C++ Standard Library Issues to be moved in Rapperswil Marshall Clow 2018-05-06 2018-06 WG21 Adopted 2018-06
P1085R1 Should Span be Regular? Tony Van Eerd 2018-05-04 2018-06 P1085R0 Evolution
P1097R0 Named character escapes R. Martinho Fernandes 2018-06-21 2018-06 SG16, Evolution, Core
P1097R1 Named character escapes R. Martinho Fernandes 2018-06-22 2018-06 P1097R0 SG16, Evolution, Core
P1099R0 Using Enum Gašper Ažman, Jonathan Müller 2018-05-23 2018-06 SG1, Library Evolution
P1100R0 Efficient composition with DynamicBuffer Vinnie Falco 2018-06-18 2018-06 Library Evolution
P1102R0 Down with ()! Alex Christensen, JF Bastien 2018-06-20 2018-06 Core
P1103R0 Merging Modules Richard Smith, Gabriel Dos Reis 2018-06-22 2018-06 WG21
P1105R0 Leaving no room for a lower-level language: A C++ Subset Ben Craig 2018-06-21 2018-06 SG14, Evolution
P1108R0 web_view Hal Finkel 2018-06-22 2018-06 Library Evolution
P1109R0 WG21 2018-06 Rapperswil Record of Discussion Nina Dinka Ranns 2018-06-12 2018-06 WG21
P1110R0 A placeholder with no name Jeffrey Yasskin, JF Bastien 2018-06-07 2018-06 Evolution
P1111R0 Resolutions to NB Comments on the Parallelism TS v2 Bryce Adelstein Lelbach, Matthias Kretz 2018-06-04 2018-06 SG1, Library Evolution, Library Adopted 2018-06
P1113R0 Core Language Working Group "ready" Issues for the June, 2018 (Rapperswil) meeting William M. Miller 2018-06-08 2018-06 WG21 Adopted 2018-06
P1114R0 Core Language Working Group "tentatively ready" Issues for the June, 2018 (Rapperswil) meeting William M. Miller 2018-06-05 2018-06 WG21 Adopted 2018-06
P1118R0 Concat and Split on simd<> objects Tim Shen, Matthias Kretz 2018-06-08 2018-06 Library Adopted 2018-06
P1119R0 ABI for std::hardware_{constructive,destructive}_interference_size JF Bastien, Olivier Giroux, Olivier Giroux, Hal Finkel, Thomas Rodgers, Matthias Kretz 2018-06-22 2018-06 SG1, Library Evolution, Library
P1120R0 Consistency improvements for <=> and other comparison operators Richard Smith 2018-06-08 2018-06 Core Adopted 2018-06
P1122R0 Proposed Wording for Concurrent Data Structures: Read-Copy-Update (RCU) Paul McKenney, Michael Wong, Maged M. Michael, Geoffrey Romer, Andrew Hunter, Arthur O'Dwyer, David S. Hollman, JF Bastien, Hans Boehm, David Goldblatt, Frank Birbacher 2018-06-07 2018-06 Library Evolution, Library
P1128R0 Summer 2018 WG21 Batavia LWG Meeting Information Walter E. Brown 2018-06-21 2018-06 Library
P1131R0 Core Issue 2292: simple-template-id is ambiguous between class-name and type-name Jens Maurer 2018-06-23 2018-06 Core
P1132R0 out_ptr - a scalable output pointer abstraction JeanHeyd Meneide, Todor Buyukliev, Isabella Muerte 2018-06-25 2018-06 Library Evolution, Library
P1133R0 Networking TS Associations For Call Wrappers Vinnie Falco 2018-06-21 2018-06 Library Evolution
P1135R0 The C++20 Synchronization Library Bryce Adelstein Lelbach, Olivier Giroux, JF Bastien 2018-06-12 2018-06 SG1, Library Evolution, Library
P1136R0 2018-09 Bellevue ad-hoc meeting information Herb Sutter 2018-06-21 2018-06 WG21
P1137R0 SG16: Unicode meeting summaries 2018/05/16 - 2018/06/20 Tom Honermann 2018-06-24 2018-06 SG16
P1141R0 Yet another approach for constrained declarations Ville Voutilainen, Thomas Köppe, Andrew Sutton, Herb Sutter, Gabriel Dos Reis, Bjarne Stroustrup, Jason Merrill, Hubert Tong, Eric Niebler, Casey Carter, Tom Honermann, Erich Keane 2018-06-23 2018-06 Evolution
P1142R0 Thoughts on a conservative terse syntax for constraints Thomas Köppe 2018-06-25 2018-06 Evolution