News

Pre-Bristol standards papers mailing available

The official pre-meeting standards papers mailing is now available. It includes the spring meeting agenda, updated issues lists, and a number of new papers including at least one that came through the public std-proposals forum. (Update: Please also direct discussion about these papers to that forum.)

Note: Most or all of these papers have also been posted already to this site's Standardization RSS feed.

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup Disposition
SD-1 2013 PL22.16/WG21 document list Clark Nelson 2013-03-18 2013-03      
SD-2 ISO WG21 and INCITS PL22.16 membership list Clark Nelson 2013-03-18 2013-03      
SD-3 SC22/WG21 (C++) Study Group Organizational Information Herb Sutter 2012-10-04 2012-09      
SD-5 WG21 and PL22.16 (C++) Joint Mailing and Meeting Information Herb Sutter 2010-09-20 2012-09      
N3522 C++ Standard Library Active Issues List (Revision R82) Alisdair Meredith 2013-03-18 2013-03 N3516 Library  
N3523 C++ Standard Library Defect Report List (Revision R82) Alisdair Meredith 2013-03-18 2013-03 N3517 Library  
N3524 C++ Standard Library Closed Issues List (Revision R82) Alisdair Meredith 2013-03-18 2013-03 N3518 Library  
N3525 Polymorphic Allocators Pablo Halpern 2013-03-18 2013-03   Library Evolution  
N3526 Uniform initialization for arrays and class aggregate types Michael Price 2013-01-21 2013-03   Evolution  
N3527 A proposal to add a utility class to represent optional objects (Revision 2) F. Cacciola, A. Krzemieński 2013-03-10 2013-03 N3406 Library Evolution  
N3528 Minutes of Feb 5 2013 SG1 Phone Call Pablo Halpern 2013-02-05 2013-03      
N3529 SG5: Transactional Memory (TM) Meeting Minutes 2012/10/30-2013/02/04 Michael Wong 2013-02-14 2013-03      
N3530 Leveraging OpenMP infrastructure for language level parallelisation D. Gove, N. Copty, M. Wong 2013-03-15 2013-03   Concurrency  
N3531 User-defined Literals for Standard Library Types (version 3) Peter Sommerlad 2013-03-08 2013-03 N3468 Library Evolution  
N3532 C++ Dynamic Arrays L. Crowl, M. Austern 2013-03-12 2013-03 N2648 Library Evolution  
N3533 C++ Concurrent Queues L. Crowl, C. Mysen 2013-03-12 2013-03 N3434 Concurrency  
N3534 C++ Pipelines A. Mackintosh, A. Berkan 2013-03-15 2013-03   Concurrency  
N3535 C++ Stream Mutexes Lawrence Crowl 2013-03-06 2013-03 N3395 Concurrency  
N3536 C++ Sized Deallocation Lawrence Crowl 2013-03-05 2013-03 N3432 Core  
N3537 Clarifying Memory Allocation L. Crowl, C. Carruth 2013-03-12 2013-03 N3433 Core  
N3538 Pass by Const Reference or Value Lawrence Crowl 2013-03-06 2013-03 N3445 Evolution  
N3539 C++ Standard Core Language Active Issues, Revision 83 William M. Miller 2013-03-18 2013-03 N3501 Core  
N3540 C++ Standard Core Language Defect Reports and Accepted Issues, Revision 83 William M. Miller 2013-03-18 2013-03 N3502 Core  
N3541 C++ Standard Core Language Closed Issues, Revision 83 William M. Miller 2013-03-18 2013-03 N3503 Core  
N3542 Proposal for Unbounded-Precision Integer Types Pete Becker 2013-03-18 2013-03 N3417 Numerics  
N3543 Priority Queue, Queue and Stack: Changes and Additions G. Powell, T. Blechmann 2013-03-15 2013-03 N3479 Library Evolution  
N3544 SG5: Transactional Memory (TM) Meeting Minutes 2013/02/25-2013/03/04 Michael Wong 2013-03-06 2013-03      
N3545 An Incremental Improvement to integral_constant Walter E. Brown 2013-03-12 2013-03   Library Evolution  
N3546 TransformationTraits Redux Walter E. Brown 2013-03-12 2013-03   Library Evolution  
N3547 Three <random>-related Proposals Walter E. Brown 2013-03-12 2013-03   Library Evolution  
N3548 Conditionally-supported Special Math Functions for C++14 Walter E. Brown 2013-03-12 2013-03   Library Evolution  
N3549 s/bound/extent/ Walter E. Brown 2013-03-12 2013-03   Core  
N3550 Proposed C++14 Value Classification Walter E. Brown 2013-03-12 2013-03   Core  
N3551 Random Number Generation in C++11 Walter E. Brown 2013-03-12 2013-03      
N3552 Introducing Object Aliases Walter E. Brown 2013-03-12 2013-03   Evolution  
N3553 Proposing a C++1Y Swap Operator Walter E. Brown 2013-03-12 2013-03   Evolution  
N3554 A Parallel Algorithms Library J. Hoberock, O. Giroux, V. Grover, H. Sutter, et al. 2013-03-15 2013-03   Concurrency  
N3555 A URI Library for C++ G. Matthews, D. Berris  
N3507 Networking  
N3556 Thread-Local Storage in X-Parallel Computations P. Halpern, C. Leiserson 2013-03-18 2013-03   Concurrency  
N3557 Considering a Fork-Join Parallelism Library Pablo Halpern 2013-03-18 2013-03   Concurrency  
N3558 A Standardized Representation of Asynchronous Operations N. Gustafsson, A. Laksberg, H. Sutter, S. Mithani 2013-03-15 2013-03 N3428 Concurrency  
N3559 Proposal for Generic (Polymorphic) Lambda Expressions F. Vali, H. Sutter, D. Abrahams 2013-03-17 2013-03 N3418 Evolution  
N3560 Proposal for Assorted Extensions to Lambda Expressions F. Vali, H. Sutter, D. Abrahams 2013-03-17 2013-03   Evolution  
N3561 Semantics of Vector Loops R. Geva, C. Nelson 2013-03-15 2013-03   Concurrency  
N3562 Executors and schedulers, revision 1 M. Austern, L. Crowl, C. Carruth, N. Gustaffson, et al. 2013-03-15 2013-03 N3378 Concurrency  
N3563 C++ Mapreduce C. Mysen, L. Crowl, A. Berkan 2013-03-15 2013-03 N3446 Concurrency  
N3564 Resumable Functions N. Gustafsson, D. Brewis, H. Sutter, S. Mithani 2013-03-15 2013-03 N3328 Concurrency  
N3565 IP Address Design Constraints Aleksandar Fabijanic 2013-03-15 2013-03   Networking  
N3566 Evolution Open Issues Ville Voutilainen 2013-03-12 2013-03   Evolution  
N3567 Evolution Closed Issues Ville Voutilainen 2013-03-12 2013-03   Evolution  
N3568 Shared locking in C++ Howard Hinnant 2013-03-11 2013-03 N3427 Concurrency  
N3569 SPRING 2014 JTC1/SC22/WG21 C++ STANDARDS COMMITTEE MEETING: Preliminary Information Peter Sommerlad 2013-03-15 2013-03      
N3570 Quoted Strings Library Proposal (Revision 1) Beman Dawes 2013-03-14 2013-03 N3431 Library Evolution  
N3571 A Proposal to add Single Instruction Multiple Data Computation to the Standard Library P. Estérie, M. Gaunard, J. Falcou 2013-03-15 2013-03   Concurrency  
N3572 Unicode Support in the Standard Library Mark Boyall 2013-03-10 2013-03   Library Evolution  
N3573 Heterogenous extensions to unordered containers Mark Boyall 2013-03-10 2013-03   Library Evolution  
N3574 Binding stateful functions as function pointers Mark Boyall 2013-03-10 2013-03   Library Evolution  
N3575 Additional Standard allocation schemes Mark Boyall 2013-03-10 2013-03   Library Evolution  
N3576 SG8 Concepts Teleconference Minutes - 2013-03-12 Herb Sutter 2013-03-12 2013-03      
N3577 Fall 2013 JTC1/SC22/WG21 C++ Standards Committee Meeting Nevin Liber 2013-03-14 2013-03      
N3578 Proposing the Rule of Five Walter E. Brown 2013-03-12 2013-03   Evolution  
N3579 A type trait for signatures Mike Spertus 2013-03-15 2013-03 N3466 Library Evolution  
N3580 Concepts Lite: Constraining Templates with Predicates A. Sutton, B. Stroustrup, G. Dos Reis 2013-03-17 2013-03   Concepts  
N3581 Delimited iterators Mike Spertus 2013-03-16 2013-03   Library Evolution  
N3582 Return type deduction for normal functions Jason Merrill 2013-03-15 2013-03 N3386 Core  
N3583 Exploring constexpr at Runtime Scott Schurr 2013-03-13 2013-03   Evolution  
N3584 Wording for Accessing Tuple Fields by Type Mike Spertus 2013-03-14 2013-03   Library  
N3585 Iterator-Related Improvements to Containers (Revision 2) Alan Talbot 2013-03-17 2013-03 N3450 Library  
N3586 Splicing Maps and Sets A. Talbot, H. Hinnant 2013-03-17 2013-03   Library  
N3587 For Loop Exit Strategies Alan Talbot 2013-03-17 2013-03   Evolution  
N3588 make_unique Stephan T. Lavavej 2013-03-15 2013-03   Library Evolution  
N3589 Summary of Progress Since Portland towards Transactional Language Constructs for C++ H. Boehm, J. Gottschlich, V. Luchangco, M. Wong, et al. 2013-03-15 2013-03      
N3591 Summary of Discussions on Explicit Cancellation in Transactional Language Constructs for C++ H. Boehm, J. Gottschlich, M. Moir, M. Wong, et al. 2013-03-15 2013-03   Evolution  
N3592 Alternative cancellation and data escape mechanisms for transactions Torvald Riegel 2013-03-15 2013-03   Evolution  
N3593 std::split(): An algorithm for splitting strings Greg Miller 2013-03-13 2013-03 N3510 Library Evolution  
N3594 std::join(): An algorithm for joining a range of elements Greg Miller 2013-03-13 2013-03   Library Evolution  
N3595 Simplifying Argument-Dependent Lookup Rules Peter Gottschling 2013-03-15 2013-03   Evolution  
N3596 Code Reuse in Class Template Specialization Peter Gottschling 2013-03-15 2013-03   Evolution  
N3597 Relaxing constraints on constexpr functions Richard Smith 2013-03-15 2013-03 N3444 Evolution  
N3598 constexpr member functions and implicit const Richard Smith 2013-03-12 2013-03   Evolution  
N3599 Literal operator templates for strings Richard Smith 2013-03-13 2013-03   Evolution  
N3600 C++ Latches and Barriers Alasdair Mackintosh 2013-03-16 2013-03   Concurrency  
N3601 Implicit template parameters M. Spertus, D. Vandevoorde 2013-03-17 2013-03 N3405 Evolution  
N3602 Template parameter deduction for constructors M. Spertus, D. Vandevoorde 2013-03-14 2013-03 N3405 Evolution  
N3603 A Three-Class IP Address Proposal Christopher Kohlhoff 2013-03-17 2013-03   Networking  
N3604 Centralized Defensive-Programming Support for Narrow Contracts J. Lakos, A. Zakharov 2013-03-18 2013-03   Library Evolution  
N3605 Member initializers and aggregates Ville Voutilainen 2013-03-15 2013-03   Evolution  
N3606 Extending std::search to use Additional Searching Algorithms Marshall Clow 2013-03-17 2013-03 N3411 Library  
N3607 Making non-modifying sequence operations more robust M. Spertus, A. Pall 2013-03-15 2013-03   Library Evolution  
N3608 exchange() utility function, revision 2 Jeffrey Yasskin 2013-03-15 2013-03 N3511 Library Evolution  
N3609 string_view: a non-owning reference to a string, revision 3 Jeffrey Yasskin 2013-03-15 2013-03 N3512 Library Evolution  
N3610 Generic lambda-capture initializers, supporting capture-by-move Ville Voutilainen 2013-03-15 2013-03   Evolution  
N3611 A Rational Number Library for C++ Bill Seymour 2013-03-15 2013-03 N3489 Numerics  
N3612 Desiderata of a C++11 Database Interface Thomas Neumann 2013-03-15 2013-03   Library Evolution  
N3613 "Static If" Considered B. Stroustrup, G. Dos Reis, A. Sutton 2013-03-16 2013-03   Concepts  
N3614 unwinding_exception Herb Sutter 2013-03-11 2013-03   Evolution  
N3615 Constexpr Variable Templates Gabriel Dos Reis 2013-03-18 2013-03   Evolution  
N3617 Lifting overload sets into function objects Philipp Juschka 2013-03-14 2013-03   Evolution  
N3618 What can signal handlers do? (CWG 1441) Hans Boehm 2013-03-17 2013-03   Concurrency  
N3619 A proposal to add swappability traits to the standard library Andrew Morrow 2013-03-15 2013-03   Library Evolution  
N3620 Network byte order conversion Kyle Kloepper 2013-03-18 2013-03   Networking  

New paper: N3582, Return Type Deduction for Normal Functions (Revision 3) -- Jason Merrill

[Ed.: Also of broad interest and on track for near-term standardization.]

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3582

Date: 2013-03-15

Return Type Deduction for Normal Functions (Revision 3)

by Jason Merrill

Excerpt:

Any C++ user introduced to the C++11 features of auto, lambdas, and trailing return types immediately wonders why they can't just write auto on their function declaration and have the return type deduced. This functionality was proposed previously in N2954, but dropped from C++11 due to time constraints, as the drafting didn't address various questions and concerns that the Core WG had. I have now implemented this functionality in GCC, and propose to add it to C++14. I discuss some of the less obvious aspects of the semantics below.

This proposal also resolves core DRs 975 (lambda return type deduction from multiple return statements) and 1048 (inconsistency between auto and lambda return type deduction).

 

New paper: N3580, Concepts Lite -- Andrew Sutton, Bjarne Stroustrup, Gabriel Dos Reis

[Ed.: We're calling particular attention to this paper as of broad interest to the community, although still undergoing standardization. This is one of the major papers being considered at the upcoming Bristol standards meeting in April for near-term standardization work.]

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3580

Date: 2013-03-17

Concepts Lite: Constraining Templates with Predicates

by Andrew Sutton, Bjarne Stroustrup, Gabriel Dos Reis

Excerpt:

In this paper, we introduce template constraints (a.k.a., “concepts lite”), an extension of C++ that allows the use of predicates to constrain template arguments. The proposed feature is minimal, principled, and uncomplicated. Template constraints are applied to enforce the correctness of template use, not the correctness of template definitions. The design of these features is intended to support easy and incremental adoption by users. More precisely, constraints:

  • allow programmers to directly state the requirements of a set of template arguments as part of a template’s interface,
  • support function overloading and class template specialization based on constraints,
  • fundamentally improve diagnostics by checking template arguments in terms of stated intent at the point of use, and
  • do all of this without any runtime overhead or longer compilation times.

This work is implemented as a branch of GCC-4.8 and is available for download at http://concepts.axiomatics.org/˜ans/. The implementation includes a compiler and a modified standard library that includes constraints. Note that, as of the time of writing, all major features described in this report have been implemented.

This paper is organized like this:

  • Tutorial: introduces the basic notions of constraints, shows examples of their use, and gives examples of how to define constraints.
  • Discussion: explains what constrains are not. In particular, we try to outline constraints’s relation to concepts and to dispel some common misconceptions about concepts.
  • User’s guide: provides many more tutorial examples and demonstrate the completeness of the constraints mechanism.
  • Implementation: gives an overview of our GCC compiler support for constraints.
  • Extensions: we discuss how constraints might be extended to interact with other proposed features.
  • Language definition: presents a semi-formal definition of constraints.

Quick Q: Why use C varargs when you have initializer_lists and variadic templates? -- StackOverflow

Quick A: No reason, varargs are type-unsafe and entirely superseded by C++11 features (unless you need C compatibility).

Why use variadic arguments now when initializer lists are available?

I've been wondering what are the advantages of variadic arguments over initializer lists. Both offer the same ability -- to pass indefinite number of arguments to a function.

 

What I personally think is initializer lists are a little more elegant. Syntax is less awkward.

Also, it appears that initializer lists have significantly better performance as the number of arguments grows.

 

So what am I missing, besides the possibility to use use variadic arguments in C as well?

New paper: N3554, A Parallel Algorithms Library -- NVIDIA, Microsoft, Intel

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Context: In Kona, Redmond, and Portland, Study Group 1 (SG1, Concurrency) discussed language- and library-based ways to add parallelization and vectorization to Standard C++. For Bristol, three participating companies -- NVIDIA, Microsoft, and Intel -- were asked to come up with a combined proposal for a parallel algorithms library as one contribution. This is their first combined paper.

Document number: N3554

Date: 2013-03-15

A Parallel Algorithms Library

by Jared Hoberock et al. (NVIDIA, Microsoft, Intel)

Excerpt:

1 Executive Summary

We introduce a library of algorithms with parallel execution semantics. Some of these algorithms have semantics similar to the existing standard library of sequential algorithms. Some of the algorithms we propose are novel.

We introduce three parallel execution policies for parallel algorithm execution: std::seq, std::par, and std::vec, as well as a facility for vendors to provide non-standard execution policies as extensions. These policy objects may be used to specify how a parallel algorithm should be executed:

std::vector<int> vec = ...

// legacy sequential sort
std::sort(vec.begin(), vec.end());

// explicit sequential sort
std::sort(std::seq, vec.begin(), vec.end());

// parallel sort
std::sort(std::par, vec.begin(), vec.end());

// vectorized sort
std::sort(std::vec, vec.begin(), vec.end());

// sort with dynamically-selected execution
size_t threshold = ...
std::execution_policy exec = std::seq;
if(vec.size() > threshold)
{
  exec = std::par;
}

std::sort(exec, vec.begin(), vec.end());

// parallel sort with non-standard implementation-provided execution policies:
std::sort(vectorize_in_this_thread, vec.begin(), vec.end());
std::sort(submit_to_my_thread_pool, vec.begin(), vec.end());
std::sort(execute_on_that_gpu, vec.begin(), vec.end());
std::sort(offload_to_my_fpga, vec.begin(), vec.end());
std::sort(send_this_computation_to_the_cloud, vec.begin(), vec.end());

Algorithms invoked with std::seq execute internally in sequential order in the calling thread.

Algorithms invoked with std::par are permitted to execute internally in an unordered fashion in unspecified threads. It is the caller’s responsibility to ensure that the invocation does not introduce data races or deadlocks.

Algorithms invoked with std::vec are permitted to execute internally in an unordered fashion in unspecified threads. In addition to the restrictions implied by std::par, it is the caller’s responsibility to ensure that a std::vec invocation does not throw exceptions or attempt to perform synchronization operations.

Algorithms invoked without an execution policy execute as if they were invoked with std::seq.

An implementation may provide additional execution policies besides std::seq, std::par, or std::vec.

This proposal is a pure addition to the existing C++ standard library; we do not believe it alters the semantics of any existing functionality.

2 Design Notes and Outstanding Questions

Before introducing the detailed specification of our proposal, we begin by outlining our rationale and by noting that we have identified a number of outstanding questions which require further work to resolve. ...

Meeting C++ 2013 -- Nov 8-9, Düsseldorf, Germany

As C++ heats up, we continue to see new conferences including this one that launched last year. Europe's newest C++ conference is being held again in 2013, with room for 250 attendees and several standards committee members already signed up to speak:

Meeting C++ 2013 Announcement

Information page

Call for Papers (open until May 15)

After last years great success, we will meet again for 2 days full of C++ in Germany this Fall. Meeting C++ 2013 will be again at the 2nd weekend of November (8./9.11.2013). This time the conference will take place at the Lindner Congresshotel in Düsseldorf. For this year there will be 25 Talks and up to 2 keynotes for the 250 attendees at the conference! ...

There will be 3 Tracks about C++ this year, with the 3rd track being a theme track about C++ and UI. ... The other two tracks will offer general C++ talks like last year.

Preconditions, Part 3 -- Andrzej Krzemieński

Andrzej continues with a third installment in his series on preconditions.

Preconditions, Part 3

by Andrzej Krzemieński

In this post, I examine a couple of cases and try to answer the question when and how to specify preconditions, and when it is better not to do it. I believe it gives a deeper insight into the nature of preconditions.

New paper: N3551, Random Number Generation in C++11 -- Walter Brown

Ed.: Most standardization papers are about technical changes. It's not often you get a tutorial written by a world-class expert submitted as a WG21 paper. Thanks, Walter!

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3551

Date: 2013-03-12

Random Number Generation in C++11

by Walter Brown

Excerpt:

For programmers seeking to familiarize themselves with the <random> component of the
C++11 standard library, we provide background information and tutorial guidance with numerous
usage examples.

1 Introduction 1
2 Getting started 2
3 An anti-pattern 3
4 Initializing an engine 3
5 What else can an engine do? 4
6 Engines in the standard library 5
7 Sharing an engine 5
8 Distributions in the standard library 6
9 What else can a distribution do? 8
10 A simple toolkit 9
11 A final example 9
12 Caveat lector! 10
13 What’s next? 11
14 Acknowledgments 11
15 Bibliography 11
16 Revision history 12