March 2016

Trip report: C++ standards meeting in Jacksonville, Feb-Mar 2016 -- Herb Sutter

A comprehensive trip report from the just-concluded ISO C++ meeting:

Trip report: Winter ISO C++ standards meeting

by Herb Sutter

From the article:

On March 5, the ISO C++ committee completed its winter meeting in Jacksonville, FL, USA. We had record-tying attendance, with over 110 experts officially representing eight national bodies. As usual, we met for six days Monday through Saturday, and around the clock from 8:30am till 10pm most days, after which many people still went back to hang out in the lobby or their rooms to update papers. — The hotel had a baby grand piano outside the main meeting room lobby, and so late at night you could often walk by and find one of several committee members playing a tune, while as usual people collaborated on their proposals, perched on couches and tables clustered around glowing rectangles, incanting standardese to the soft strains of Russian folk ballads and arena rock.

Here’s a summary of what happened, with some details about the current ISO C++ process so you can see just how the work is progressing and getting released. I’ve tried to add some links to the relevant feature design papers, or to the papers that summarize what was done which in turn usually carry more links to the design papers...

Jacksonville approved papers and issues

The following is a list of the papers approved at the Jacksonville meeting that ended on Saturday. Some of the papers appeared in the pre-meeting mailing or an earlier mailing; most were updated during the meeting and for convenience this post includes and links to copies of the approved papers. All updated approved papers will appear also in the official post-meeting mailing, as will the official minuted form of the following notes.

More readable summaries will be posted in trip reports. This post is primarily making the papers available for linking and reference.

 

Accept as Defect Reports the issues in P0167R2 (Core Language "ready" Issues) and apply their proposed resolutions to the C++ working paper.

Accept as Defect Reports the issues in P0263R1 (Core Language "tentatively ready" Issues) and apply their proposed resolutions to the C++ working paper.

Apply to the C++ working paper the proposed wording in P0188R1 ("Wording for [[fallthrough]] attribute").

Apply to the C++ working paper the proposed wording in P0189R1 ("Wording for [[nodiscard]] attribute").

Apply to the C++ working paper the proposed wording in P0212R1 ("Wording for [[maybe_unused]] attribute").

Apply to the C++ working paper the proposed wording in P0017R1 ("Extension to aggregate initialization").

Apply to the C++ working paper the proposed wording in P0170R1 ("Wording for Constexpr Lambda").

Apply to the C++ working paper the proposed wording in P0036R0 ("Unary Folds and Empty Parameter Packs (revision 1)").

Apply to the C++ working paper the proposed wording in P0184R0 ("Generalizing the Range-Based For Loop").

Apply to the C++ working paper the proposed wording in P0018R3 ("Lambda Capture of *this by Value as [=,*this]").

Apply to the C++ working paper the proposed wording in P0138R2 ("Construction Rules for enum class Values").

Apply to the C++ working paper the proposed wording in P0245R1 ("Hexadecimal floating literals for C++").

Request a new work item for a Technical Specification on C++ Extensions for Modules and create a working paper with P0143R2 ("Wording for Modules") as its initial content.

 

Apply the resolutions of the following issues in "Ready" status from P0165R1 to the C++ Working Paper:

2276 Missing requirement on std::promise::set_exception
2523 std::promise synopsis shows two set_value_at_thread_exit()'s for no apparent reason
2537 Constructors for priority_queue taking allocators should call make_heap

Note that the following issues, marked Ready in the paper, are not being advanced:

2253 [arrays.ts] dynarray should state which container requirements aren't met
2255 [arrays.ts] dynarray constructor ambiguity

 

Apply the resolutions of the following issues in "Tentatively Ready" status from P0165R1 to the C++ Working Paper:

2192 Validity and return type of std::abs(0u) is unclear
2450 (greater less greater_equal less_equal)<void> do not yield a total order for pointers
2520 N4089 broke initializing unique_ptr<T[]> from a nullptr
2545 Simplify wording for bind without explicitly specified return type
2557 Logical operator traits are broken in the zero-argument case
2559 Error in LWG 2234's resolution
2560 is_constructible underspecified when applied to a function type
2565 std::function's move constructor should guarantee nothrow for reference_wrappers and function pointers
2566 Requirements on the first template parameter of container adaptors
2571 §[map.modifiers]/2 imposes nonsensical requirement on insert(InputIterator, InputIterator)
2572 The remarks for shared_ptr::operator* should apply to cv-qualified void as well
2576 istream_iterator and ostream_iterator should use std::addressof
2577 {shared,unique}_lock should use std::addressof
2579 Inconsistency wrt Allocators in basic_string assignment vs. basic_string::assign
2581 Specialization of <type_traits> variable templates should be prohibited
2582 §[res.on.functions]/2's prohibition against incomplete types shouldn't apply to type traits
2583 There is no way to supply an allocator for basic_string(str, pos)
2585 forward_list::resize(size_type, const value_type&) effects incorrect
2586 Wrong value category used in scoped_allocator_adaptor::construct()
2590 Aggregate initialization for std::array

 

Apply the resolutions of the following issues in "Tentatively Ready" status from P0165R1 to the Library Fundamentals Working Paper:

2522 [fund.ts.v2] Contradiction in set_default_resource specification
2539 [fund.ts.v2] invocation_trait definition definition doesn't work for surrogate call functions
2558 [fund.ts.v2] Logical operator traits are broken in the zero-argument case
2574 [fund.ts.v2] std::experimental::function::operator=(F&&) should be constrained
2575 [fund.ts.v2] experimental::function::assign should be removed

 

Apply to the C++ Working Paper the Proposed Wording from P0024R2, The Parallelism TS Should be Standardized.

Apply to the C++ Working Paper the Proposed Wording from P0226R1, Mathematical Special Functions for C++17, v5.

Apply to the C++ Working Paper the Proposed Wording from P0220R1, Adopt Library Fundamentals V1 TS Components for C++17 (R1).

Apply to the C++ Working Paper the Proposed Wording from P0218R1, Adopt the File System TS for C++17.

Apply to the C++ Working Paper the Proposed Wording from P0033R1, Re-enabling shared_from_this (revision 1).

Apply to the C++ Working Paper the Proposed Wording from P0005R4, Adopt not_fn from Library Fundamentals 2 for C++17.

Apply to the C++ Working Paper the Proposed Wording from P0152R1, constexpr atomic::is_always_lock_free.

Apply to the C++ Working Paper the Proposed Wording from P0185R1, Adding [nothrow-]swappable traits, revision 3.

Apply to the C++ Working Paper the Proposed Wording from P0253R1, Fixing a design mistake in the searchers interface.

Apply to the C++ Working Paper the Proposed Wording from P0025R0, An algorithm to "clamp" a value between a pair of boundary values.

Apply to the C++ Working Paper the Proposed Wording from P0154R1, constexpr std::hardware_{constructive,destructive}_interference_size.

Apply to the C++ Working Paper the Proposed Wording from option #2 in P0030R1, Proposal to Introduce a 3-Argument Overload to std::hypot.

Apply to the C++ Working Paper the Proposed Wording from P0031R0, A Proposal to Add Constexpr Modifiers to reverse_iterator, move_iterator, array and Range Access and apply the resolution of LWG Issue 2296 - std::addressof should be constexpr. This issue is published in P0304R0.

Apply to the C++ Working Paper the Proposed Wording from P0272R1, Give 'std::string' a non-const '.data()' member function.

Apply to the C++ Working Paper the Proposed Wording from P0077R2, is_callable, the missing INVOKE related trait.

CppCast Episode 48: Clean Code with Arne Mertz

Episode 48 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Arne Mertz to discuss Clean Coding techniques.

CppCast Episode 48: Clean Code with Arne Mertz

by Rob Irving and Jason Turner

About the interviewee:

Arne is a Software Engineer at Zühlke Engineering, a blogger and a clean code enthusiast. He has been maintaining and developing large financial C++ applications for several years. Arne has a diploma in physics and has written some scientific code for his degree courses in Fortran77 and C++ before he started his programming career. Currently he is broadening his view on the software development world by doing test automation, integration, requirements engineering and tooling for a large Java/JavaScript web application. To keep in touch with C++ he continues to write about it on his blog, reads other blogs and watches videos of conference talks.

In his free time he sings in a choir together with his wife and enjoys playing video games. He likes to travel a lot, especially tall ship sailing.

Building and Using Themis in PNaCl

Cossaclabs offers via their Themis framework to run C++ code inside browsers on x86 and now on ARM platforms.

Building and Using Themis in PNaCl

by cossacklabs

From the article:

Native Client (NaCl) allows browser applications to launch a native low-level code in an isolated environment. Thanks to this, some code, performance code parts can be rewritten in C or C++ easily. Until recent time, NaCl could work on x86-compatible systems only, yet supporting ARM platform becomes very important, because a huge variety of devices (especially the newest Chrome OS laptops), are built on ARM architecture.

All you need to compile the code for ARM is located in the latest Native Client SDK. However, using NaCl forces developers to include support for all used architectures. This is achieved by building NaCl separately for all the architectures supported. Then the browser chooses the correct object to launch, basing on the architecture information.

Despite the fact that ARM architecture support in NaCl is rapidly improving, we should note that while Samsung Chromebooks remain being a primary objective for NaCl developers, it’s too early to talk about adequate ARM architecture support.

Guidelines Support Library Review: span--Marius Bancila

Explanations on the span:

Guidelines Support Library Review: span<T>

by Marius Bancila

From the article:

The Guidelines Support Library is a Microsoft implementation of some of the types and functions described in the C++ Core Guidelines maintained by the Standard C++ Foundation. Among the types provided by the GSL is span<T> formerly known as array_view<T>. This article is an introduction to this type.

Code Browser by Woboq

Woboq presents the release of their C++ Code Browser.

Code Browser by Woboq

by Woboq

From the website:

This is an online C and C++ code browser. It focuses on improving the code navigation with proper semantic highlighting and tooltips.

  • Take the feature tour
  • Enable faster understanding of code
  • Get it for your own project

One can browse some open source projects like Qt, GLibc, LLVM, Boost, GCC, and Linux