The Future Is Here: C++11 -- Bjarne Stroustrup
Prof. Stroustrup spoke at A9 last week on "The Future is Here: C++11." The video is now available on YouTube:
The Future Is Here: C++11
Special Guest Lecture by C++ Inventor Bjarne Stroustrup
June 16-21, Sofia, Bulgaria
September 13-19, Aurora, CO, USA
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 3-8, Kona, HI, USA
By Blog Staff | Aug 29, 2013 11:46 AM | Tags: None
Prof. Stroustrup spoke at A9 last week on "The Future is Here: C++11." The video is now available on YouTube:
The Future Is Here: C++11
Special Guest Lecture by C++ Inventor Bjarne Stroustrup
By Blog Staff | Aug 29, 2013 09:11 AM | Tags: None
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: N3744
Date: 2013-08-30
Proposing [[pure]]
by Walter Brown
Excerpt:
Following significant prior art, this paper proposes a
pure
attribute to specify that a function
or statement is free of observable side effects.
By Blog Staff | Aug 29, 2013 09:09 AM | Tags: None
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: N3743
Date: 2013-08-30
Conditionally-supported Special Math Functions for C++14, v2
by Walter Brown
Excerpt:
This paper proposes to merge International Standard 29124:2010, “Extensions to the C++
Library to support mathematical special functions,” into C++14 as a conditionally-supported
standard library feature.
By Blog Staff | Aug 29, 2013 09:05 AM | Tags: None
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: N3742
Date: 2013-08-30
Three <random>-related Proposals, v2
by Walter Brown
Excerpt:
This paper proposes (1) to add one function template to
<algorithm>
, (2) to add a few novice-friendly
functions to<random>
, and (3) to deprecate some related<cstdlib>
legacy interfaces.
The unifying factor in this tripartite proposal is the entities’ respective connection with the
random number component of the C++11 standard library.
By Blog Staff | Aug 29, 2013 09:02 AM | Tags: None
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: N3741
Date: 2013-08-30
Toward Opaque Typedefs for C++1Y, v2
by Walter Brown
Excerpt:
Although this paper is self-contained, it logically follows our discussion, begun several years ago in
N1706 and continued in N1891, of a feature oft-requested for C++: an opaque typedef, sometimes
termed a strong typedef. The earlier of those works was presented to WG21 on 2004-10-20 during
the Redmond meeting, and the later work was presented during the Berlin meeting on 2005-04-06.
Both presentations resulted in very strong encouragement to continue development of such a
language feature. Alas, the press of other obligations has until recently not permitted us to
resume our explorations.Now with C++11 as a basis, we return to the topic. Where our earlier thinking and nomenclature
seem still valid, we will repeat and amplify our exposition; where we have new insights, we will
follow our revised thinking and present for EWG discussion a high-level proposal for a C++1Y
language feature to be known as an opaque alias. ...
By Blog Staff | Aug 29, 2013 09:01 AM | Tags: None
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: N3740
Date: 2013-08-30
A Proposal for the World’s Dumbest Smart Pointer, v2
by Walter Brown
Excerpt:
We present the following code as a preliminary specification of intent in order to serve as a
basis for technical discussion. Designed as a pointer that takes no formal notice of its pointee’s
lifetime, this not-very-smart pointer template is intended as a replacement for near-trivial uses of
bare/native/raw/built-in/dumb C++ pointers, especially when used to communicate with (say)
legacy code that traffics in such pointers. It is, by design, exempt (hence its working name) from
any role in managing any pointee, and is thus freely copyable independent of and without regard
for its pointee.We have found that such a template provides us a standard vocabulary to denote non-owning
pointers, with no need for further comment or other documentation to describe the near-vacuous
semantics involved...
By Blog Staff | Aug 29, 2013 05:53 AM | Tags: intermediate
Quick A: Using type erasure.
Quick Q2: ... Um, what's that?
Quick A2: Read this post...
How is std::function implemented?
According to the sources I have found, a lambda expression is essentially implemented by the compiler creating a class with overloaded function call operator and the referenced variables as members. This suggests that the size of lambda expressions varies, and given enough references variables that size can be arbitrarily large.
An
std::function
should have a fixed size, but it must be able to wrap any kind of callables, including any lambdas of the same kind. How is it implemented? Ifstd::function
internally uses a pointer to its target, then what happens, when thestd::function
instance is copied or moved? Are there any heap allocations involved?
By Blog Staff | Aug 28, 2013 02:41 PM | Tags: concurrency
N3711.pdfA 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: N3711
Date: 2013-08-15
Task Groups As a Lower Level C++ Library Solution To Fork-Join Parallelism
by Artur Laksberg and Herb Sutter
Excerpt:
The
task_group
concept proposed in this document is based on the common subset of the PPL and the TBB libraries, which also usetask_group
internally to implement many of their own parallel algorithms. This proposal complements the high-level Parallel STL algorithms proposal [2] by enabling arbitrary fork-join parallelism, including arbitrary additional higher-level parallelism algorithms, to be built in a natural and portable way.Together with [2], we believe this offers a viable alternative to a language-based proposal for low-level fork-joined parallelism with competitive (or in some cases better) usability, generality, and performance.
By Blog Staff | Aug 28, 2013 02:35 PM | Tags: None
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: N3716p>
Date: 2013-08-18
A printf-like Interface for the Streams Library (revision 1)
by Zhihao Yuan
Excerpt:
Changes since N3506
- Support Boost.Format’s simple positional syntax (
%1%
,%2%
...).- Cover the cornor cases “not-mentioned” by the C standard.
- Mention the function style syntax suggested by BSI in “Future Issues”.
Overview
cout << putf("hello, %s\n", "world");
Printf defines the most widely used syntax to format a text output. It exists in C, Perl, Python and even Java™, and is available from Qt to Boost.Format[1], but not C++ standard library. This proposal tries to define such an interface based on the
printf
function defined by C[2] for the C++ I/O streams library, with the error handling policy and the type safety considered.
By Blog Staff | Aug 28, 2013 02:28 PM | Tags: concurrency
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: N3708
Date: 2013-03-04
A proposal to add coroutines to the C++ standard library
by Oliver Kowalke and Nat Goodspeed
Excerpt:
This proposal suggests adding two first-class continuations to the C++ standard library:
std::coroutine<T>::pull_type
andstd::coroutine<T>::push_type
.