A Look at C++14: Papers Part I -- Meeting C++

[Ed. Note: Although labeled "A look at C++14," not all of these papers are for C++14, and regardless of timeframe not all will be adopted. But it is a useful look at what's on the commitee's radar.]

As we gear up for the Bristol meeting that starts on April 15, the committee members now are busily reading and preparing positions on the many papers to be considered at the meeting.

Since our last meeting in Portland, we have a recent-record-level 160 technical papers, most of which are proposals that will need to be considered and discussed at the face-to-face meeting.

Those papers have been posted here; see the blog's Standardization category. Most recently, the papers have been posted individually with crafted excerpts, and many committee members have found that useful and already follow the mailings primarily here on the blog like everyone else.

However, it's not just the committee members who are interested in these proposals. The Meeting C++ blog has posted the first of a multi-part series of "digest" summaries of the papers in the March mailing (they skipped the January mailing). In this first installment, they summarize a first batch of papers...

A look at C++14: Papers Part I

This is the first Part of n, or lets say many entries in this blog. In total I hope to be able to cover most papers in 3-4 blog posts, giving the reader an overview over the suggestions and changes for C++ at the coming C++ Committee Meeting in April. In total there are 98 Papers, so I will skip some, but try to get as much covered as possible. I'll skip papers with Meeting Minutes for sure, and try to focus on those focusing on C++11 or C++14 features. As the papers are ordered by there Number (N3522 being the first), I'll go top down, so every blog post will contain different papers from different fields of C++ Standardization. As N352-24 are Reports about Active Issues, Defects and Closed Issues I'll skip them for now, also I will not read through Meeting Minutes and such.

Quick Q: So what's "lite" about "concepts lite" vs. full concepts?

There's a Q&A on StackOverflow, but see also the discussion about this in the March 12 Concepts conference call minutes that were posted here on the same day as the call. It's really more than minutes, it's also a record of discussion that answers this and other questions.

From SO:

What are the differences between concepts and template constraints?

I want to know what are the semantic differences between the C++ full concepts proposal and template constraints (for instance, constraints as appeared in Dlang or the new concepts-lite proposal for C++1y).

What are full-fledged concepts capable of doing than template constraints cannot do?

Quick Q: How should you use the standard smart pointers as members? -- StackOverflow

From StackOverflow:

Using smart pointers for class members

I'm having trouble understanding the usage of smart pointers as class members in C++11. I have read a lot about smart pointers and I think I do understand how unique_ptr and shared_ptr/weak_ptr work in general. What I don't understand is the real usage. It seems like everybody recommends using unique_ptr as the way to go almost all the time. But how would I implement something like this: ...

Quick Q: Why does emplace_back need a (copy or) move constructor? -- StackOverflow

Quick A: It needs it when the container is a vector or similar, because the container may need to grow and reallocate which includes moving or copying the existing contents to the new location.

why does emplace_back need move constructor?

I have the following code... But the emplace_back doesn't use the move constructor. Why does the initialization require a move constructor in this instance?

Qt Creator 2.7.0: More C++11, and C++11 Now Default

Qt Creator 2.7.0 is now available, and includes more C++11 support including that C++11 mode is now on by default.

Qt Creator 2.7.0 Released

by Eike Ziller

C++ support in Qt Creator got even more improvements for C++11, like handling of alignof, alignas and noexcept, brace initializers, and more lambda fixes. Also, if Qt Creator cannot find out if your tool chain expects C++11 or C++98/03, it defaults to C++11 now, for a better out of the box experience.

GCC's Move to C++ -- Linda Jacobsen

It's nice to see more C++ compilers being written in C++ rather than C. The Clang compiler is already all-C++. In recent years GCC has been slowly doing the same -- first compiling the C code as C++ code, and more recently using C++ itself.

Here is a readable summary of progress to date.

GCC's Move to C++

by Linda Jacobsen

Excerpt:

In 2008, 2009, and 2010, (i.e., at the beginning and after each milestone) Taylor provided formal plans for the next steps. There is no formal plan going forward from here. People will use C++ constructs in future patches as they deem necessary, but not just for the sake of doing so. Some will limit their changes to the times when they are patching the code anyway. Others approach the existing C code with an eye to converting code to C++ wherever it makes the code clearer or more efficient. Therefore, this is an ongoing effort on a meandering path for the foreseeable future.

GCC 4.8 released

GCC 4.8 has been released. C++-related improvements include the following highlights.

Language improvements:

  • G++ now implements the C++11 thread_local keyword...
  • G++ now implements the C++11 attribute syntax, e.g.
      [[noreturn]] void f();
    and also the alignment specifier, e.g.
      alignas(double) int i;
  • G++ now implements C++11 inheriting constructors, e.g.
      struct A { A(int); };
      struct B: A { using A::A; }; // defines B::B(int)
      B b(42); // OK
  • G++ now supports a -std=c++1y option for experimentation with features proposed for the next revision of the standard, expected around 2017. Currently the only difference from -std=c++11 is support for return type deduction in normal functions, as proposed in N3386.
  • The G++ namespace association extension, __attribute ((strong)), has been deprecated. Inline namespaces should be used instead.

Standard library improvements:

Improved experimental support for the new ISO C++ standard, C++11, including:

  • forward_list meets the allocator-aware container requirements;
  • this_thread::sleep_for(), this_thread::sleep_until() and this_thread::yield() are defined without requiring the configure option --enable-libstdcxx-time;
  • SSE optimized normal_distribution and simd_fast_mersenne_twister_engine.
  • Use of hardware RNG instruction for random_device on new x86 processors (requires the assembler to support the instruction.)

Webinar: C++ in the Multi-Device Enterprise -- David Intersimone

On Tuesday, March 26, Embarcadero's David Intersimone will be speaking live on the web:

C++ in the Multi-Device Enterprise

David Intersimone, "David I"
Vice President of Developer Relations and Chief Evangelist

Tuesday, March 26, 2013

  • 6:00AM PDT / 9:00AM EDT / 13:00 UTC
  • 11:00AM PDT / 2:00PM EDT / 18:00 UTC
  • 5:00PM PDT / 8:00PM EDT / 11:00AM 27-Mar Australia EDT

Description:

In every conversation, social network post and industry article, you hear about the need for multi-device support inside an Enterprise.  Terms like BYOD appear in most articles and Enterprise strategies.  Computing in a modern Enterprise is not only a Microsoft Windows world.  Enterprise organizations need to support a wide array of devices that their employees are using to be more productive.  The modern enterprise also needs to support additional software architectures including Cloud computing, multi-tier, REST and SOAP web services and more.

This webinar showcases how C++ can help satisfy the Enterprise’s need to support multiple devices on desktops, servers, web, mobile and multi-tiers in their infrastructure.  Coverage includes C++Builder’s support for ISV and enterprise class integrated database, middleware and cloud computing. With C++Builder XE3, you get integrated support for SQL Server, Oracle, Sybase, DB2, InterBase, SQL Anywhere, SQLite, MySQL, and cloud services including Windows Azure and Amazon.

During the webinar, you will learn how to:

  • Leverage platform services, devices and sensors in your multi-device C++ applications
  • Build multi-device C++ applications that connect with enterprise SQL databases
  • Create multi-device C++ desktop applications that consume web services using SOAP and REST
  • Build scalable multi-tier, multi-device, master detail database applications