June 2016

C++ Core Guidelines Checkers are now in a single NuGet package--Andrew Pardoe

The Visual C++ Team announces:

C++ Core Guidelines Checkers are now in a single NuGet package

From the article:

We’re now shipping both the experimental checkers, including the lifetime checkers, and the regular checkers in one NuGet package (the GSL is still installed as a dependency.) New MSBuild scripts allow us to extend project settings so that you can select specific extensions during code analysis...

Clang 3.8 in the May release of Clang with Microsoft CodeGen--Andrew Pardoe

Clang gets updated on Windows:

Clang 3.8 in the May release of Clang with Microsoft CodeGen

by Andrew Pardoe

From the article:

We have just released our fifth out-of-band update of Clang/C2 toolset. As always, this release has been driven by your feedback. While we’ve heard a lot of feature requests the one’s we’ve heard most frequently are that you want Clang 3.8 and you want x64-hosted compilers. We’re happy to say that we’re shipping both Clang 3.8 and x64-hosted compilers in the May 2016 release.

CppCon 2015 Variadic Templates in C++11 / C++14 - An Introduction--Peter Sommerlad

Have you registered for CppCon 2016 in September? Don’t delay – 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 2015 for you to enjoy. Here is today’s feature:

Variadic Templates in C++11 / C++14 - An Introduction

by Peter Sommerlad

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Writing class templates and functions accepting a variable number of arguments has been a burden before C++11. With variadic templates, both class templates with a variable number of arguments as well as functions can be formulated much easier and more type safe way.

Nevertheless, the authoring of variadic templates can be challenging for the uninitiated. Even the interpretation of variadic template code can be a problem, as Olve Maudal's famous pub quiz shows.

This session will build up understanding and the ability to use and author variadic template functions and variadic template classes from easy examples up to more complicated applications such as employing std::forward correctly, std::integer_sequence and other upcoming language features such as a template UDL operator that bridges the gap between string literals and std::integer_sequence.

Understanding pack expansion, sizeof... and other hard to get on first sight issues are my goal. In the end you should have seen guidelines that help you avoid the template instantiation trap from the pub quiz and correct usage of std::forward in your variadic templates.

2016-06 Pre-Oulu mailing available

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

NOTE: A number of these papers have already been publicized on this blog. This is the complete list including ones not previously publicized.

 

2016-06 pre-Oulu
N4590 PL22.16/WG21 draft agenda: 20-25 Jun 2016, Oulu, FI Clark Nelson 2016-04-07 2016-06
N4591 WG21 telecon meeting: Pre-Oulu Herb Sutter 2016-05-19 2016-06
N4592 Modules TS Working Draft Gabriel Dos Reis 2016-05-30 2016-06
N4593 Editor's Report -- Working Draft, Standard for Programming Language C++ Richard Smith 2016-05-30 2016-06
N4594 Working Draft, Standard for Programming Language C++ Richard Smith 2016-05-30 2016-06
P0009R2 Polymorphic Multidimensional Array View H. Carter Edwards, Bryce Lelbach, Christian Trott, Mauro Bianco, Robin Maffeo, Ben Sander 2016-05-27 2016-06 P0009R1 Library Evolution
P0023R0 Relocator: Efficiently moving objects Denis Bider 2016-04-08 2016-06
P0032R2 Homogeneous interface for variant, any and optional (Revision 2) Vicente J. Botet Escriba 2016-03-13 2016-06 P0032R1 Library Evolution
P0035R3 Dynamic memory allocation for over-aligned data Clark Nelson 2016-05-26 2016-06 P0035R2 Core, Library Evolution
P0037R2 Fixed-point real numbers John McFarlane 2016-05-30 2016-06 P0037R1 Numerics, SG14
P0040R2 Extending memory management tools Brent Friedman 2016-05-29 2016-06 P0040R1 Library Evolution, SG14
P0057R4 Wording for Coroutines Gor Nishanov 2016-05-29 2016-06 P0057R3 Core, Library
P0062R1 When should compilers optimize atomics? JF Bastien, Peter Dimov, Hal Finkel, Paul McKenney, Michael Wong, Jeffrey Yasskin 2016-05-27 2016-06 P0062R0 Concurrency
P0067R2 Elementary string conversions, revision 2 Jens Maurer 2016-05-27 2016-06 P0067R1 Library
P0073R2 On unifying the coroutines and resumable functions proposals Torvald Riegel 2016-05-30 2016-06 P0073R1 Evolution
P0076R2 Vector and Wavefront Policies Arch Robison, Pablo Halpern, Robert Geva, Clark Nelson, Jens Maurer 2016-05-28 2016-06 P0076R1 Library Evolution
P0084R1 Emplace Return Type (Revision 1) Alan Talbot 2016-05-28 2016-06 P0084R0 Library Evolution, Library
P0091R2 Template argument deduction for class templates (Rev. 5) Mike Spertus, Faisal Vali, Richard Smith 2016-05-29 2016-06 P0091R1 Core
P0095R1 Pattern Matching and Language Variants David Sankel 2016-05-29 2016-06 P0095R0 Evolution
P0096R3 Feature-testing recommendations for C++ Clark Nelson 2016-04-29 2016-06 P0096R2 Feature Testing
P0108R1 Skeleton Proposal for Thread-Local Storage (TLS) Paul E. McKenney, JF Bastien 2016-04-14 2016-06 P0108R0 Concurrency, Library Evolution
P0119R2 Overload sets as function arguments Andrew Sutton 2016-05-28 2016-06 P0119R1 Evolution
P0122R2 span: bounds-safe views for sequences of objects Neil MacIntosh 2016-05-26 2016-06 P0122R1 Library Evolution
P0123R2 string_span: bounds-safe views for sequences of objects Neil MacIntosh 2016-05-26 2016-06 P0123R1 Library Evolution
P0141R0 Modules, Componentization, and Transitional Paths Gabriel Dos Reis, Pavel Curtis 2015-10-05 2016-06 Modules
P0145R2 Refining Expression Evaluation Order for Idiomatic C++ Gabriel Dos Reis, Herb Sutter, Jonathan Caves 2016-03-03 2016-06 P0145R1 Core
P0165R2 C++ Standard Library Issues to be moved in Oulu Marshall Clow 2016-05-30 2016-06 P0165R1 Library
P0190R2 Proposal for New memory order consume Definition Paul E. McKenney, Michael Wong, Hans Boehm, Jens Maurer, Jeffrey Yasskin, JF Bastien 2016-05-25 2016-06 P0190R1 Concurrency
P0194R1 Static reflection (revision 4) Matúš Chochlík, Alex Naumann 2016-05-17 2016-06 P0194R0 Reflection
P0196R1 Generic none() factories for Nullable types Vicente J. Botet Escriba 2016-05-22 2016-06 P0196R0 Library Evolution
P0202R1 Add Constexpr Modifiers to Functions in <algorithm> and <cstring> Headers Antony Polukhin 2016-05-21 2016-06 P0202R0 Library Evolution
P0209R1 make_from_tuple: apply for construction Pablo Halpern 2016-05-29 2016-06 P0209R0 Library
P0211R1 Allocator-aware library wrappers for dynamic allocation Thomas Koeppe 2016-05-30 2016-06 P0211R0 Library Evolution
P0214R1 Data-Parallel Vector Types & Operations Matthias Kretz 2016-05-28 2016-06 P0214R0 Library evolution, Concurrency
P0217R2 Proposed wording for structured bindings Jens Maurer 2016-05-26 2016-06 P0217R1 Evolution, Library Evolution
P0233R1 Hazard Pointers: Safe Reclamation for Optimistic Concurrency Maged M. Michael, Michael Wong 2016-05-29 2016-06 P0233R0 Concurrency, SG14, Library Evolution
P0237R1 Wording for fundamental bit manipulation utilities Vincent Reverdy, Robert J. Brunner 2016-05-30 2016-06 P0237R0 Library Evolution, SG14, Numerics
P0252R1 Operator Dot Wording Bjarne Stroustrup, Gabriel Dos Reis 2016-03-02 2016-06 P0252R0 Evolution, Core
P0254R1 Integrating std::string_view and std::string Marshall Clow 2016-05-29 2016-06 P0254R0 Library Evolution
P0257R1 A byte type for increased type safety Neil MacIntosh 2016-05-27 2016-06 P0257R0 Evolution
P0292R1 constexpr if: A slightly different syntax Jens Maurer 2016-05-26 2016-06 P0292R0 Core
P0296R1 Forward progress guarantees: Base definitions Torvald Riegel 2016-05-27 2016-06 P0296R0 Core
P0298R0 A byte type definition Neil MacIntosh 2016-05-27 2016-06 Library Evolution
P0306R1 Comma elision and comma deletion Thomas Koeppe 2016-05-08 2016-06 P0306R0 Evolution, Core, WG14
P0307R0 Making Optional Greater Equal Again Tony Van Eerd 2016-03-15 2016-06 Library Evolution, Library
P0315R0 Lambdas in unevaluated context Louis Dionne 2016-05-24 2016-06 Evolution
P0317R0 Directory Entry Caching for Filesystem Beman Dawes 2016-05-29 2016-06 Library
P0318R0 decay_unwrap and unwrap_reference Vicente J. Botet Escriba 2016-05-22 2016-06 Library Evolution
P0319R0 Adding Emplace functions for promise<T>/future<T> Vicente J. Botet Escriba 2016-05-22 2016-06 Library Evolution, Concurrency
P0320R0 Thread Constructor Attributes Vicente J. Botet Escriba 2016-05-22 2016-06 Library Evolution, Concurrency
P0322R0 exception_list Bryce Adelstein Lelbach, Alisdair Meredith, Jared Hoberock 2016-04-24 2016-06 Library Evolution. Concurrency
P0323R0 A proposal to add a utility class to represent expected monad (Revision 2) Vicente J. Botet Escriba 2016-05-28 2016-06 Library Evolution
P0324R0 One Concept Definition Syntax Zhihao Yuan 2016-05-04 2016-06 Evolution
P0325R0 Propose to adopt make_array in C++17 Zhihao Yuan 2016-03-31 2016-06 Library Evolution
P0326R0 Structured binding: customization point issues Vicente J. Botet Escriba 2016-05-28 2016-06 Evolution, Library Evolution
P0327R0 Product types access Vicente J. Botet Escriba 2016-05-29 2016-06 Evolution, Reflection, Library Evolution
P0329R0 Designated Initialization Tim Shen, Richard Smith, Zhihao Yuan, Chandler Carruth 2016-05-09 2016-06 Evolution
P0330R0 User-Defined Literals for size_t Rein Halbersma 2016-05-15 2016-06 N4254 Library Evolution
P0331R0 Motivation and Examples for Multidimensional Array H. Carter Edwards, Bryce Lelbach, Christian Trott, Mauro Bianco, Robin Maffeo, Ben Sander 2016-05-27 2016-06 Library Evolution
P0332R0 Relaxed Incomplete Multidimensional Array Type Declaration H. Carter Edwards, Bryce Lelbach, Christian Trott, Mauro Bianco, Robin Maffeo, Ben Sander 2016-05-27 2016-06 Library Evolution
P0333R0 Improving Parallel Algorithm Exception Handling Bryce Lelbach 2016-05-15 2016-06 Concurrency, Library Evolution, Library
P0334R0 Immutable Persistent Containers Bryce Lelbach 2016-04-24 2016-06 Library Evolution
P0335R0 Context Tokens for Parallel Algorithms Pablo Halpern 2016-05-28 2016-06 Concurrency
P0336R0 Better Names for Parallel Execution Policies in C++17 Pablo Halpern 2016-05-28 2016-06 Concurrency, Library Evolution
P0337R0 Delete operator= for polymorphic_allocator Pablo Halpern 2016-05-25 2016-06 Library Evolution, Library
P0338R0 C++ generic factories Vicente J. Botet Escriba 2016-05-24 2016-06 Library Evolution
P0339R0 polymorphic_allocator<void> as a vocabulary type Pablo Halpern, Dietmar Kühl 2016-05-31 2016-06 Library Evolution
P0340R0 Making std::underlying_type SFINAE-friendly R. "Tim" Song 2016-05-30 2016-06 Library Evolution
P0341R0 parameter packs outside of templates Mike Spertus 2016-05-30 2016-06 Reflection, Evolution
P0342R0 Timing barriers Mike Spertus 2016-05-30 2016-06 Evolution
P0343R0 Meta-programming High-Order Functions Vicente J. Botet Escriba 2016-05-24 2016-06 Library Evolution
P0345R0 Allowing any unsigned integral type as parameter type for literal operators Michael Dominiak 2016-05-25 2016-06 Evolution
P0346R0 A <random> Nomenclature Tweak Walter E. Brown 2016-05-25 2016-06 Library
P0347R0 Simplifying simple uses of <random> R. "Tim" Song, Melissa O'Neill 2016-05-30 2016-06 Numerics, Library Evolution
P0348R0 Validity testing issues Andrzej Krzemienski 2016-05-25 2016-06 Core
P0349R0 Assumptions about the size of datapar Matthias Kretz 2016-05-24 2016-06 Concurrency
P0350R0 Integrating datapar with parallel algorithms and executors Matthias Kretz 2016-05-24 2016-06 Concurrency
P0352R0 Smart References through Delegation: An Alternative to N4477's Operator Dot Hubert Tong, Faisal Vali 2016-05-30 2016-06 Evolution
P0353R0 Unicode Encoding Conversions for the Standard Library Beman Dawes 2016-05-30 2016-06 Library Evolution
P0354R0 default == is >, default < is < so Tony Van Eerd 2016-05-15 2016-06 Evolution
P0355R0 Extending <chrono> to Calendars and Time Zones Howard Hinnant 2016-05-30 2016-06 Library Evolution
P0356R0 Simplified partial function application Tomasz Kamiński 2016-05-22 2016-06 Library Evolution
P0357R0 reference_wrapper for incomplete types Tomasz Kamiński 2016-05-24 2016-06 Library Evolution
P0358R0 Fixes for not_fn Tomasz Kamiński 2016-05-28 2016-06 Library Evolution
P0359R0 SG5: Transactional Memory (TM) Meeting Minutes 2016/02/22-2016/05/23 Michael Wong 2016-05-30 2016-06 Transaction Memory
P0360R0 SG14: Low Latency Meeting Minutes 2016/02/17-2015/05/25 Michael Wong 2016-05-30 2016-06 SG14
P0361R0 Invoking Algorithms asynchronously Hartmut Kaiser, Thomas Heller, Michael Wong 2016-05-30 2016-06 Concurrency, SG14, Library Evolution
P0364R0 Report on Exception Handling Lite (Disappointment) from SG14 Michael Wong, Sunil Srivastava, Sean Middleditch, Patrice Roy 2016-05-23 2016-06 Evolution, SG14, Concurrency
P0366R0 Extending the Transactional Memory Technical Specification with an in_transaction Statemen Victor Luchangco, Michael Spear, Michael Wong 2016-05-30 2016-06 Reflection
P0367R0 a C++ standard library class to qualify data accesses Ronan Keryell, Joël Falcou 2016-05-29 2016-06 Library Evolution, SG14, Concurrency
P0369R0 2017-07 Toronto ISO WG21 C++ Standard Meeting information Michael Wong, Botond Ballo, JF Bastien, Hubert Tong, Patrice Roy, Tony Van Eerd, Duncan Smith 2016-05-23 2016-06 WG21
P0370R0 Ranges TS Design Updates Omnibus Casey Carter, Eric Niebler 2016-05-30 2016-06 Library Evolution
P0371R0 Temporarily deprecate memory_order_consume Hans Boehm 2016-05-26 2016-06 Concurrency, Core
P0372R0 A type for utf-8 data Michael Spencer, Davide C. C. Italiano 2016-05-30 2016-06 Evolution
P0373R0 Proposal of File Literals Andrew Tomazos 2016-05-21 2016-06 Evolution
P0374R0 Stream parallelism patterns J. Daniel Garcia, David del Rio, Manuel F. Dolz, Javier Garcia-Blas, Luis M. Sanchez, Marco Danelutto, Massimo Torquati 2016-05-30 2016-06 Concurrency
P0375R0 [[exhaustive]] attribute for enums David Sankel 2016-05-29 2016-06 Evolution
P0376R0 A Single Generalization of std::invoke, std::apply, and std::visit Matt Calabrese 2016-05-28 2016-06 Library Evolution
P0377R0 std::integral_constant with a Deduced Value Type Matt Calabrese 2016-05-29 2016-06 Library Evolution
P0379R0 Why a joining thread from P0206 is a Bad Idea Detlef Vollman 2016-05-27 2016-06 Library Evolution, Library
P0380R0 A Contract Design G. Dos Reis, J. D. Garcia, J. Lakos, A. Meredith, N. Myers, B. Stroustrup 2016-05-28 2016-06 Evolution
P0381R0 Numeric Width John McFarlane 2016-05-30 2016-06 Numerics, SG14
P0382R0 Comments on P0119: Overload sets as function arguments Tomasz Kamiński 2016-05-29 2016-06 Evolution
P0384R0 Core Language Working Group "tentatively ready" Issues for the June, 2016 (Oulu) meeting William M. Miller 2016-05-30 2016-06 Core
P0385R0 Static reflection: Rationale, design and evolution Matúš Chochlík, Alex Naumann 2016-05-30 2016-06 Reflection, Evolution
P0386R0 Inline Variables Hal Finkel, Richard Smith 2016-05-30 2016-06 Evolution

CppCast Episode 58: CLion with Anastasia Kazakova

Episode 58 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Anastasia Kazakova to discuss new features of JetBrains' Clion IDE.

CppCast Episode 58: CLion with Anastasia Kazakova

by Rob Irving and Jason Turner

About the interviewee:

A C/C++ fan since university, Anastasia has been creating real-time *nix-based systems and pushing them to production for 8 years. She has a passion for networking algorithms (especially congestion problems and network management protocols) and embedded programming, and believes in good tooling. Now she is a part of the JetBrains team working as a Product Marketing Manager for CLion, a cross-platform C/C++ IDE.

VoidParam Puzzle -- Alex Marmer

Alex Marmer has openend a puzzle.

VoidParam Puzzle 

From the article:

How to handle 'void' parameter passed in a macro. He provides a solution as well.

In case that you have other or better solutions, don't hesitate to use the comment option on this site.

Quick Q: If nullptr_t isn't a keyword, why are char16_t and char32_t?

Quick A: To allow overloading with the underlying types of uint_least16_t and uint_least32_t

Recently on SO:

If nullptr_t isn't a keyword, why are char16_t and char32_t?

The proposal itself explains why: to allow overloading with the underlying types of uint_least16_t and uint_least32_t. If they were typedefed this wouldn't be possible.

Define char16_t to be a distinct new type, that has the same size and representation as uint_least16_t. Likewise, define char32_t to be a distinct new type, that has the same size and representation as uint_least32_t.

[N1040 defined char16_t and char32_t as typedefs to uint_least16_t and uint_least32_t, which make overloading on these characters impossible.]

As for why they aren't in the std namespace, this is for compatibility with the original C proposal. C++ prohibits the C definitions from appearing in its own version of <cuchar>

[c.strings] / 3

The headers shall not define the types char16_t, char32_t, and wchar_t (2.11).
The types then would need to be global typedefs, which carries its own set of issues such as
typedef decltype(u'q') char16_t;

namespace foo {
  typedef int char16_t;
}

The reason for std::nullptr_t not being a keyword can be found in the question you linked

We do not expect to see much direct use of nullptr_t in real programs.
making nullptr_t the real exception here.