February 2014

C++ Papers for Issaquah - Library I

The third part of my series about the papers for Issaquah is about the first batch of library proposals

C++ Papers for Issaquah - Library I

by Jens Weller

From the article:

The 3rd part of the C++ papers for Issaquah series will be about the library proposals. The last part covered the papers from concepts, database and evolution. There are a lot of proposals from the library group, and I think some of them are the most interesting, as they don't have any impact on the core language.

C++ Now 2014 sold out in under a month

cppnow14-soldout.pngAs interest in C++ keeps rising, there are more C++ events but they are also selling out faster. C++ Now 2013, Going Native 2013, and C++ and Beyond 2013 all sold out, some six months before the event.

Now C++ Now 2014 has sold out faster than last year -- this time it sold out in less than a month since registration opened, with over three months left to go.

The good news: You can still register to get on the waiting list, and if you act now there's a good chance you can still get a seat. Each year there will be some number of cancellations, and the organizers expect to be able to take a number of people on the waiting list.

If you have not yet registered for C++ Now 2014 but are interested in potentially going, even if you're not certain yet you should join the waiting list today to get in the queue for a chance to sign up for the last few seats that will open up!

 

If you missed registering for C++ Now and don't make the waiting list, don't despair -- there will be additional major C++ events around the world later this year. Watch for upcoming announcements here on isocpp.org. Stay tuned...

Quick Q: What's the difference between std::merge and std::inplace_merge? -- StackOverflow

Quick A: "Inplace" can deal with overlapping ranges, but will take either more space or more time.

Today on StackOverflow:

Difference between std::merge and std::inplace_merge?

What is the difference between std::merge and std::inplace_merge in terms of complexity and result when it is executed on two consecutive ranges with elements that are all different ? (I am not a native english speaker and I am not sure to clearly understand what "inplace" means)

Overload 119 is now available

overload-119.PNGOverload 119 is now available. It contains the following C++-related articles, and more:

 

Overload 119

Feature: Static Polymorphic Named Parameters in C++ -- Martin Moene

Adding parameters to an object can be messy. Here is a description of method chaining -- an interesting way to pass parameters into methods in a more readable fashion.

Capturing Lvalue References in C++11 Lambdas -- Pete Barber

How confusing does it get when references refer to references and references are captured by value? Pete Barber shows us that it all falls out in the C++ consistency wash.

C++ Papers for Issaquah - Concepts, Database and Evolution

This is the second part of my series about the papers for the next C++ committee meeting in Issaquah:

C++ Papers for Issaquah - Concepts, Database & Evolution

by Jens Weller

From the article:

This is the second part about the papers for the C++ committee meeting in February in Issaquah. This time featuring papers from the subgroups of concept, database and evolution. Again, most papers in this series aim for a standard after C++14, most important for C++14 will be the national comments on the new standard. Also there are no new papers from the core working group, only the active issues, defects report and closed issues report are on this mailing.

 

Quick Q: Why does unique_ptr take two template parameters when shared_ptr only takes one? -- SO

Recently on StackOverflow:

Why does unique_ptr take two template parameters when shared_ptr only takes one?

Both unique_ptr and shared_ptr accept a custom destructor to call on the object they own. But in the case of unique_ptr, the destructor is passed as a template parameter of the class, wherease the type of shared_ptr's custom destructor is to be specified as a template parameter of the constructor.

template <class T, class D = default_delete<T>>
class unique_ptr
{
    unique_ptr(T*, D&); //simplified
    ...
};

and

template<class T>
class shared_ptr
{
    template<typename D>
    shared_ptr(T*, D); //simplified
    ...
};

I can’t see why such difference. What requires that?

Quick Q: What do braces mean as a function argument? -- StackOverflow

Quick A: Something cool and convenient -- you can construct a temporary variable of the parameter type without having to repeat the type.

From SO:

C++ 11 Curly Braces

I haven't used C++ for a good few years, and have just come across this:

program.build({ default_device })

The definition is:

cl_int build(
    const VECTOR_CLASS<Device>& devices,
    const char* options = NULL,
    void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL,
    void* data = NULL) const

What are the curly braces there for? I have never seen them used in a function call like this before. I assume it has something to do with the function pointer, but that seems optional?

N3906: ISO/IEC PDTS 18822, File System, National Body Comments -- Barry Hedquist

Note: These are the results of the main international review and comment ballot for the File System TS. The Issaquah ISO C++ meeting that begins on Monday will be a ballot resolution meeting for both C++14 and the File System TS.

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

Date: 2014-02-03

ISO/IEC PDTS 18822, File System, National Body Comments

by Barry Hedquist

Excerpt:

Attached is a revision of SC22 N4901, the complete set of National Body Comments submitted to JTC1 SC22 in response to the SC22 Letter Ballot for ISO/IEC PDTS 18822, File System.

N3900: WG21 2014-01-31 Telecon Minutes -- Herb Sutter

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

Date: 2014-01-31

WG21 2014-01-31 Telecon Minutes

by Herb Sutter

Excerpt:

The focus of the upcoming face to face meeting in Issaquah will be ballot resolution:

  • C++14 CD ballot comment resolution to produce a C++14 DIS at the end of Issaquah.
  • File System PDTS ballot comment resolution.

In remaining time we will also work on issues lists and TS work.