Clang reaches 100%: Fully compliant compiler expected this summer

Reported via Twitter by ISO C++ project editor Stefanus Du Toit:

Clang is C++11 feature complete as of *just now*! Here's the final commit by Richard Smith: http://llvm.org/viewvc/llvm-project?view=revision&revision=179858 … #llvm #cxx11

With Richard Smith's commit to finish thread_local support, Clang is now believed to be code-complete for full C++11 support.

As Clang usually releases twice a year, industry observers expect this means we will see at least one fully C++11-conforming commercial compiler available in the marketplace by this summer.

Congratulations, Clang development team!

Quick Q: What Is the Difference Between set and unordered_set in C++? -- StackOverflow

A common Q with a nice concise A:

What is the difference between set and unordered_set in C++?

Came across this good question, which is similar but not at all same since it talks about Java, which has different implementation of hash-tables, [...] So what is the difference in C++ implementation of set and unordered_set? This question can be ofcourse extended to map vs unordered_map and so on for other C++ containers.

Here is my initial assessment...

The Bristol Papers and the State of C++

One observer's commentary on the standards meeting in process this week, based on the mailing papers and interviewing some delegates by telephone:

The Bristol Papers and the State of C++

[This is] a follow up on the series about the papers for the Bristol Meeting. I'll try to give a little look at C++14, it is slowly taking shape. But as the [Bristol standards] meeting is still going on, there are a lot of pending details missing to put up the facts for C++14. Maybe we have to wait till Chicago for C++14 clearly taking shape. Also I want to cover some of the feedback, and write a little bit about my own view on C++, now after reading all the papers.

A Look at C++14 and Beyond: Papers Part 4 -- Meeting C++

And the final part 4:

A look at C++14 and beyond: Papers Part 4

This is the 4th and last part about the Pre-Bristol mailing and its papers. This series has given me a good overview, what is up in the future in C++. Still, some things are missing, not all will come to shine in this series. I have no papers with actual proposals skipped, but a few papers are only to find in the January mailing, and not in this one. One of them is for example a paper on filesystem, which should make it into C++14. However, there will be a follow up to this series. At the next meeting of my local C++ User Group we are going to have a video call with Michael Wong and other attendees of the meeting. This will be an interesting chat for sure, and help me refine my view on C++14 and C++17 Standards. I'll write this down in the follow up, featuring also some of the feedback that has come.

Before I start with the last 23 Papers, I'll want to shortly mention where this idea has come from. Last fall I saw two blog entries about the Portland Meeting, each naming a few favorite papers and a short summary of them. One was Japanese, and one was Korean, as far as I remember. I had never seen anything like this in the west, no blog, no site brought anything about the papers. Organizing Meeting C++ did not give me the time, to do something similar back then. The decision to cover all papers came, as I wanted to read through most papers any way, and most papers are worth reading. I'm not yet sure if I do something similar for the Chicago Meeting, as this is very time consuming, and therefore would like to state, that I do look for possible Sponsors helping me doing this.

But, lets get started on some papers...

New paper: N3621, Minutes, WG21 Teleconference 2013-03-29 -- Kyle Kloepper

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

Date: 2013-03-29

Minutes, WG21 Teleconference 2013-03-29

by Kyle Kloepper

Excerpt:

Meredith asks if core is in a good place to vote out C++14 in Bristol. Miller confirms that CWG is ready for a CD. Holes in C++11 have been plugged. CWG is in a better place than FDIS for C++11.

[...] tentative schedule for evening [sessions at the Bristol meeting]:

  • (Mon) OpenMP
  • (Tue) Alisdair: C++11 allocator best practices
  • (Wed) Concepts Lite update
  • (Thu) TM [Transactional Memory]

​[Ed.: And likely also: (Fri) C/C++ compatibility. This is a record number of evening sessions.]

New paper: N3631, C11: The New C Standard -- Tom Plum

Note: Both this paper by Tom Plum and the other just posted by Bjarne Stroustrup refer to prior published articles about C and C++ compatibility. The reason for drawing attention to that information is that C and C++ compatibility is now expected to be discussed at next week's ISO C++ meeting in Bristol. For an example why this discussion is taking place now, see paper N3557 section 7, which raises the question of compatibility between C and C++ for parallelism, including that pressure from C choices affects our design choices for C++ as well.

However, the C++ committee's focus at Bristol is still on working toward a Committee Draft ballot for C++14. This C/C++ compatibility discussion is expected to take place late in the meeting when the technical work for C++ in general and C++14 in particular is complete.

 

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

Date: 2013-04-09

C11: The New C Standard

by Tom Plum

Excerpt, including explaining why the above title is not a link:

This material was originally published in a series of articles in Dr. Dobb’s (www.drdobbs.com) and is reprinted here, with permission, for use by C++ committee members. Outside the committee, please refer to readers to the following links, rather than distributing this document. (Copyright 2012 Dr. Dobb’s)

http://www.drdobbs.com/cpp/232800444 (C11 overview, concurrency, etc.)

http://www.drdobbs.com/cpp/232901670 (C11 security, Annex K, Annex L)

http://www.drdobbs.com/cpp/240001401 (Alignment, Unicode, ease‐of‐use features, C++ compatibility)

New paper: N3628, C and C++ Compatibility -- Bjarne Stroustrup

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

Date: 2013-04-08

C and C++ Compatibility

by Bjarne Stroustrup

Excerpt:

It seems that a serious discussion about C/C++ compatibility is starting. “By popular demand,” here is a paper in three parts that I wrote just over 10 years ago. Much have changed since that, so please don’t expect the paper to be completely up-to-date or to completely reflect my current views. However, I don’t have the time to write a 2013 version of these 2002 papers, and I don’t change my fundamental opinions all that often. I think that C/C++ compatibility is very important and valuable for both the C and C++ communities.

  • C and C++: Siblings. The C/C++ Users Journal. July 2002.
  • C and C++: A Case for Compatibility. The C/C++ Users Journal. August 2002.
  • C and C++: Case Studies in Compatibility. The C/C++ Users Journal. September 2002.

Quick Q: How Can Use a Lambda Function as a Hash Function for unordered_map? -- StackOverflow

Quick A: Name the lambda (by assigning it to a variable), then decltype it.

People sometimes ask this, so it's worth putting out a quick link to the short answer:

How to use lambda function as hash function in unordered_map?

I wonder if it is possible to use lambda function as custom hash function for unordered_map in C++11? If so, what is the syntax?