The Future of C++: Live broadcast this Friday

imageIn my talk on Friday, there will be announcements of broad interest to C++ developers on all compilers and platforms. Please help spread the word.

The Future of C++

Friday, November 2, 2012
12:45pm (U.S. Pacific Time)

This talk will give an update on recent progress and near-future directions for C++, both at Microsoft and across the industry, with some announcements of interest in both areas. The speaker is the lead language architect of Visual C++ and chair of the ISO C++ committee.

The talk will be webcast live on Channel 9, and available soon afterwards on demand.

If you know people who are interested in C++, on any platform, you’ll want to let them know to tune in.

Reader Q&A: volatile (again)

Sarmad Asgher asked a variant of a perennial question:

I am implementing multi producer single consumer problem. I have shared variables like m_currentRecordsetSize which tells the current size of the buffer. I am using m_currentRecordsetSize in a critical section do i need to declare it as volatile.

If you’re in C or C++, and the variable is not already being protected by a mutex or similar, then you need to declare it atomic (e.g., if it’s an int, then atomic_int in C or atomic<int> in C++. Not volatile.

Also is there any article by you on this topic. Please do reply.

There is! See my article “volatile vs. volatile” for the difference and why C/C++ volatile has nothing to do with inter-thread communication.

CTP of Windows XP Targeting with C++ in Visual Studio 2012

The three by-far-most-requested “missing features” from Visual C++ 2012 were:

  1. Conformance: Keep adding more C++11 language conformance features.
  2. XP Targeting: Deliver the ability to build applications that could run on Windows XP, as well as Windows Vista, 7, and 8.
  3. Desktop Express: Deliver a free VC++ Express compiler that can be used to create traditional Windows desktop apps, not just Windows Store apps.

Over the spring and summer, we promised to address these “soon after VC++ 2012 ships.”

Well, VC++ 2012 shipped four weeks ago.

What’s happened since then?

 

3. On the same day VS2012 shipped, four weeks ago, we also announced and released Visual Studio 2012 Desktop Express – a free Visual Studio version for writing traditional Windows applications.

 

image2. Today, we are pleased to share a “community tech preview” (CTP) of Windows XP targeting in Visual C++ 2012, being delivered as part of Visual Studio 2012 Update 1 CTP 3. You can download the preview here. See the announcement page for details, known issues, and full release information.

 

1. Stay tuned…

Poll: What features would you like to see added soonest in your favorite C++ compiler?

I just got back from teaching a class, and I’m always amazed at the breadth and diversity of C++ developers. As Bjarne Stroustrup famously says: “No one knows ‘what most C++ developers do.'”

In particular, I’m surprised at how strongly some people feel about certain features, such as refactoring or safety or raw performance or exhaustive conformance, that don’t matter much at all to other people, and it made me wonder how a cross-section of the C++ developer community might prioritize them if I ran a poll.

So let me pose a question: Whether you use gcc or Clang or VC++ or Intel C++ or any other compiler, if you could only pick five of the following for your compiler to implement in its very next release, which would they be? Note that this is intended to be purely an “urgency” or ordering exercise, not an “importance” or eventually-will/won’t-do exercise — assume that your compiler vendor would eventually add everything possible from the list in their next few releases, and ask yourself only what would you just love to have in your hands the very soonest, right away?

(This is not intended to be a complete list, by the way, just picking some things I’ve again recently heard people mention, to validate how broadly interesting they really are.)

Thanks in advance for your participation. I’m really curious to see the results.

[Updated to add: Several people have asked to change the poll to add an option for “faster build times”. I won’t change the poll while in progress which would skew results, but for now if you want to vote for “faster builds” please post it as a comment and I’ll manually add those comments up since that seems to be a popular request.]