October 2013

New "using std::cpp" event in Spain (Spanish only)

Ready for a full day of C++11/14/17 content in the Spanish language?

using std:cpp

November 26, 2013

University Carlos III of Madrid in Leganés

The site and the event are entirely in Spanish. For convenience, here is an automatic translation of the event page:

Welcome to using std::cpp 2013

using std::cpp 2013 aims to be a forum for exchanging experiences using the C++ language, paying special attention to the recent standard C++11 and the upcoming C++14 and C++17.

Who should attend using std::cpp 2013?

The event is aimed at professional developers using C++ as a language for application development or infrastructure software. It is also aimed at students of last years of career, interested in the use of C++ as a programming language to produce complex computer systems with high performance.

What can I find in using std:cpp 2013?

We have prepared an intensive programme with presentations by leading developers from leading companies in their sectors (Indizen, TCP-SI, BBVA, Telefónica, Digital, INDRA, Biicode, Microsoft, Programming Research Group).

You can refer to the detailed program to see topics you can expect.

When does using std::cpp take place?

using std::cpp 2013 will be held on November 26, 2013 at the School Politécnica Superior of the Universidad Carlos III de Madrid in Leganes and will last for a full day.

Do I need to register?

using std::cpp 2013 attendance is free, but you must register to facilitate the organization of the event. You can register here.

What are the semantics of =delete? -- StackOverflow

The question, rephrased: Does =delete mean "make the compiler skip this function and keep looking," or "make this function unusable and make the caller fix their code" -- and why?

What's the exact semantics of a deleted function in C++11?

struct A
{
    A();

    A(const A&);
    A& operator =(const A&);

    A(A&&) = delete;
    A& operator =(A&&) = delete;
};

struct B
{
    B();

    B(const B&);
    B& operator =(const B&);   
};

int main()
{
    A a;
    a = A(); // error C2280

    B b;
    b = B(); // OK
}

My compiler is VC++ 2013 RC.

error C2280: 'A &A::operator =(A &&)' : attempting to reference a deleted function

I just wonder why the compiler doesn't try A& operator =(const A&); when A& operator =(A&&) is deleted?

Is this behavior defined by the C++ standard?

Effective GoF Patterns with C++11 and Boost -- Tobias Darm

tobias-darm.PNGSpeaking of ACCU 2014, here's an excellent talk from ACCU 2013 showing how C++11 (by itself, and/or with Boost) makes expressing many common design patterns far simpler than using traditional pre-C++11 tools. In fat, are there cases where the design patterns even disappear entirely? Watch to find out.

Effective GoF Patterns with C++11 and Boost (slides)

by Tobias Darm

Abstract and bio:

Tobias Darm discusses how some of the GoF patterns can be implemented differently in C++11 using Boost libraries.

Tobias Darm is working with C++ and programming embedded devices used in an intensive care environment at Dräger medical. He likes to learn and teach about software development and does tutorials and workshops in his company encouraging a modern programming style.

 

N3802: apply() call a function with arguments from a tuple -- Peter Sommerlad

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: N3802

Date: 2013-10-08

apply() call a function with arguments from a tuple

by Peter Sommerlad

Excerpt:

Tuples are great for generic programming with variadic templates. However, the standard does not defi ne a general purpose facility that allows to call a function/functor/lambda with the tuple elements as arguments. ...

ACCU 2014 call for papers is now open

Preparations are underway for the ACCU 2014 conference, to be held April 8-12, 2014 somewhere in the U.K. The conference has historically had strong C++ representation, and this year features a keynote by Howard Hinnant, longtime ISO C++ participant and former Library Working Group chair, and now a principal developer on Clang's libc++ implementation of the ISO C++ standard library. It also includes sessions on other languages and environments besides C++.

The conference has issued a call for papers which will close on Monday, November 5. From the call:

We have a long tradition of high quality sessions covering many aspects of software development, from programming languages (e.g., Java, Javascript, C#, Clojure, Python, Erlang, Haskell, Ruby, Groovy, C, C++, etc.), and technologies (libraries, frameworks, databases, etc.) to subjects about the wider development environment such as testing, architecture and design, development process, analysis, patterns, project management, and softer aspects such as team building, communication and leadership.

Sessions are usually tutorial-based, presentations of case studies, or interactive workshops, but we are always open to novel formats.

Pre-conference workshops are all day. Main conference sessions are 90 minutes. There are also a few 45 minutes sessions (reserved for less experienced speakers).

[...]

The Call for Papers lasts 5 weeks and will close on Monday 5th November 2013. Remember, remember, the 5th of November...

Full conference schedule will be announced 1st Jan 2014.

See the call for details on how to submit a proposed session.

Bjarne Stroustrup speaking at UNT near Dallas: October 11

Bjarne Stroustrup will be giving his "The Essence of C++" talk live in person next week at the UNT College of Engineering near Dallas, TX, USA.

The Essence of C++

by Bjarne Stroustrup

Location: UNC College of Engineering (map)
Friday, October 11, 2013
Talk: 2:00 p.m. –- 3:30 p.m.
Reception: 3:30 -- 4:00 p.m.

Abstract

C++11 is being deployed and the shape of C++14 is becoming clear. This talk examines the foundations of C++. What is essential? What sets C++ apart from other languages? How does new and old features support (or distract from) design and programming relying on this essence.

I focus on the abstraction mechanisms (as opposed to the mapping to the machine): Classes and templates. Fundamentally, if you understand vector, you understand C++.

Type safety and resource safety are key design aims for a program. These aims must be met without limiting the range of applications and without imposing significant run-time or space overheads. I address issues of resource management (garbage collection is not an ideal answer and pointers should not be used as resource handles), generic programming (we must make it simpler and safer), compile-time computation (how and when?), and type safety (casts belongs in the lowest-level hardware interface). I will touch upon move semantics, exceptions, concepts, type aliases, and more. My aim is not so much to present novel features and technique, but to explore how C++’s feature set supports a new and more effective design and programming style.

Trip report: Fall ISO C++ meeting

The fall 2013 WG21 (ISO C++) meeting was held in Chicago on September 23-28. Many thanks to DRW Trading Group for hosting us! We once again saw record attendance with over 100 experts in attendance, as also happened at the previous meeting (Bristol, April).

Below are some highlights from this week's meeting. For background, see also these links:

  • Committee structure and organization
  • Current status including how we’re delivering work via Technical Specifications (TS’s), independent specifications that are a step to eventual inclusion in the standard itself (as was done last decade with the Library Extensions “TR1”)

C++14 is on track: Clean CD, all comments tentatively or finally addressed

The primary purpose of the meeting was CD ballot resolution to deal with the national body comments on the primary international comment ballot for C++14, which concluded in mid-August.

Thanks to the high quality of the draft, the ballot results came in very clean: We received a total of 85 official comments from national bodies, plus 30 unofficial late comments. This is far lower than than the over 500 comments received for each of the two comment ballots for C++0x/C++11. Thank you very much to all the committee participants who have worked hard on the C++14 draft to bring it in at such high quality!

At this meeting, the committee addressed all 135 official and unofficial comments with final or tentative resolutions, and we expect to complete the job at the Issaquah meeting in February and launch the possibly-final C++14 ballot in February or March.

Tweaks/adjustments to the C++14 feature set

A few controversial or not-fully-baked features, mostly libraries, got moved out of C++14 into separate vehicles that are still expected to ship concurrently in a similar timeframe to C++14, but will put the facilities into a std::experimental or similar namespace instead of directly into std. In particular:

  • optional<> has moved to the Library Fundamental TS.
  • Runtime-sized arrays (a.k.a. arrays with runtime bound, or ARBs) and dynarray<> have moved to a new Array Extensions TS, possibly to be joined by one or two related facilities such an array_ref type.

We also added a few new little features, which had been discussed before but didn't make it into the C++14 working draft before the CD cutoff.

  • Digit separators: It will now be legal to write things like int x = 12’345’789; -- that is, use a single-quote instead of what in English would be a comma -- including in combination with user-defined literals.
  • Sized deallocation: Optionally passing a size to operator delete for improved allocation performance.
  • The [[deprecated]] attribute.

Technical Specification (TS) progress

As noted on the Status page, the committee has transitioned to a “decoupled” model where major pieces of work progress independently from the Standard itself and can be delivered asynchronously in the form of Technical Specifications (TS’s) that are separate from the main Standard and can later be incorporated into the Standard. This decoupled model allows the committee to deliver smaller pieces of work in a faster and more predictable way as they become ready, and to deliver the standard itself on a more consistent cadence.

We approved one TS for its next ballot:

We also launched four (count 'em, four) more TS’s, whose work has already been in progress and has now reached a point where we want to start converting each proposal into a working draft for a shippable Technical Specification:

  • Library Fundamentals TS: A set of standard library extensions for vocabulary types like optional<> (see above) and other fundamental utilities.
  • Array Extensions TS: Language and library extensions related to arrays, including runtime-sized arrays (aka arrays of runtime bound) and dynarray<> (see above).
  • Concurrency TS: Initially includes library support for executors and schedulers as well as non-blocking extensions to std::future such as .then() and .when_*() functions. Additionally may include language extensions like await, and additional libraries such as concurrent hash containers.
  • Parallelism TS: Jared Hoberock. Initially includes a Parallel STL library with support for parallel algorithms to exploit multiple cores, and vectorizable algorithms to exploit CPU and other vector units.

New ​SG for graphics drawing

Finally, I also appointed a new Study Group 13 for Graphics, with the goal of working toward a "2D Lite" drawing API. For general discussion about this topic area, see also my GoingNative talk from early September, particularly from about the 42-minute mark onward.

Thank you to the over 100 people who came to Chicago, and even more who worked on proposals in preparation for the meeting, for a very productive week. I look forward to seeing many of you at the next meeting, which will be held in February in Issaquah, WA, USA.

N3777: Wording for deprecating async -- Herb Sutter

Note: This paper was not adopted at the Chicago meeting.

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: N3777

Date: 2013-09-23

Wording for deprecating async

by Herb Sutter

Excerpt:

This paper provides proposed wording to implement a positive SG1 straw poll

N3790: Working Draft, Technical Specification, File System -- Beman Dawes

Note: This paper was approved for PDTS (primary comment) ballot on Saturday at the Chicago meeting.

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: N3790

Date: 2013-09-27

Working Draft, Technical Specification -- File System

by Beman Dawes

N3776: Wording for ~future -- Herb Sutter

Note: This paper was adopted on Saturday at the Chicago meeting.

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: N3776

Date: 2013-09-23

Wording for ~future

by Herb Sutter

Excerpt:

This paper provides proposed wording to implement a positive SG1 straw poll to clarify that ~future and
~shared_future don’t block except possibly in the presence of async.