The Rule of Zero revisited: The Rule of All or Nothing--Arne Mertz

In this article you will find a new rule of thumb:

The Rule of Zero revisited: The Rule of All or Nothing

by Arne Mertz

From the article:

In 2012, Martinho Fernandes coined the Rule of Zero in a blog post. In 2014, Scott Meyers wrote a blog post about a concern with that rule and proposed a Rule of Five Defaults.

Back then, I had written a small comment on Scott’s post that deserves some further elaboration. In this post I am going to wrap up my thoughts about the two posts and propose a “Rule of All or Nothing”...

the asynchronous library - Christophe Henry @ Meeting C++ 2014

A new video from Meeting C++ 2014:

the asynchronous library

by Christophe Henry

From the talk description:

An infrastructure library on which Boost Meta State Machine can build. This will be provided by the Asynchronous library: Active Objects, proxies, threadpools, parallelization algorithms, work-stealing, distributed programming...

2015-02 mid-meeting mailing available

The 2015-02 mailing of new standards papers is now available.

NOTE: A number of these papers have already been publicized on this blog. This is the complete list including ones not previously publicized.

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup Disposition
N4340 Remove Deprecated Use of the register Keyword Alisdair Meredith 2014-11-26 2015-02   Evolution  
N4341 C++ Standard Library Active Issues List (Revision R92) Alisdair Meredith   missing   Library  
N4342 C++ Standard Library Defect Report List (Revision R92) Alisdair Meredith   missing   Library  
N4343 C++ Standard Library Closed Issues List (Revision R92) Alisdair Meredith   missing   Library  
N4344 Suggested Design for Customization Points Eric Niebler   missing   Library  
N4345 Ranges for the Standard Library, Revision 2 Eric Niebler   missing   Library  
N4346 Multidimensional bounds, index and array_view, revision 5 Lukasz Mendakiewicz 2015-01-05 2015-02 N4177 Library  
N4347 Responses to National Body Comments, PDTS 19568, Library Fundamentals Barry Hedquist   missing      
N4348 Making std::function thread-safe Geoffrey Romer 2015-02-02 2015-02 N4159 Library  
N4349 Minutes of WG21 Telecon Jonathan Wakely 2014-12-05 2015-02      
N4350 Agenda and Meeting Notice for WG21 Concepts Meeting Notice (revision 1) Herb Sutter 2015-01-15 2015-02 N4339    
N4351 Responses to National Body Comments, PDTS 19570, C++ Extensions for Parallelism Barry Hedquist 2014-12-23 2015-02      
N4352 Parallelism TS Jared Hoberock 2015-01-08 2015-02 N4310    
N4353 Parallelism TS - Editor's Report Jared Hoberock 2015-01-08 2015-02      
N4354 Parallelism TS - DTS Ballot Document Jared Hoberock 2015-01-08 2015-02      
N4355 Shared Multidimensional Arrays with Polymorphic Layout Carter Edwards 2015-02-04 2015-02   Library  
N4356 Relaxed Array Type Declarator Carter Edwards 2015-02-04 2015-02   Evolution  
N4357 Introduce the [[noexit]] attribute for main as a hint to eliminate destructor calls for objects with static storage duration Jens Maurer 2015-01-19 2015-02 N4226 Evolution  
N4358 Unary Folds and Empty Parameter Packs Thibaut Le Jehan 2015-01-20 2015-02   Evolution  
N4359 A Proposal to Add vector release method just like unique_ptr release method to the Standard Library Jerry Liang 2015-01-09 2015-02   Library  
N4360 Delayed Evaluation Parameters Douglas Boffey 2015-01-22 2015-02   Evolution  
N4361 Concepts Lite TS Andrew Sutton 2015-01-27 2015-02 N4333    
N4362 WG21 2015-01 Skillman Minutes John Spicer 2015-01-27 2015-02      
N4363 Library Fundamentals v1 DTS Jeffrey Yasskin   missing      
N4364 Editor's Report for the Library Fundamentals v1 DTS Jeffrey Yasskin   missing      
N4365 Responses to National Body Comments, ISO/IEC PDTS 19568, C++ Extensions for Library Fundamentals Barry Hedquist 2015-01-29 2015-02      
N4366 LWG 2228: Missing SFINAE rule in unique_ptr templated assignment Howard Hinnant 2015-01-11 2015-02   Library  
N4367 Comparison in C++ Lawrence Crowl 2015-02-08 2015-02   Evolution  
N4368 Introducing alias size_type for type size_t in class std::bitset Vladimir Grigoriev 2015-02-03 2015-02   Library evolution  
N4369 Default argument for second parameter of std::advance Vladimir Grigoriev 2015-01-12 2015-02   Library evolution  
N4370 Networking Library Proposal (Revision 4) Christopher Kohlhoff 2015-02-06 2015-02 N4332 Library  
N4371 Minimal incomplete type support for standard containers, revision 2 Zhihao Yuan 2015-02-04 2015-02 N4056 Library  
N4372 A Proposal to Add a Const-Propagating Wrapper to the Standard Library Jonathan Coe 2015-02-06 2015-02 N4209 Library  
N4373 Atomic View Carter Edwards, Hans Boehm 2015-01-26 2015-02 N4142 Library  
N4374 Linux-Kernel Memory Mode Paul E. McKenney 2015-02-06 2015-02 N4322 Concurrency  
N4375 Out-of-Thin-Air Execution is Vacuous Paul E. McKenney 2015-02-06 2015-02 N4323 Concurrency  
N4376 Use Cases for Thread-Local Storage Paul E. McKenney 2015-02-06 2015-02 N4324 Concurrency  
N4377 C++ Extensions for Concepts PDTS Andrew Sutton 2015-02-09 2015-02      
N4378 Language Support for Contract Assertions John Lakos, Nathan Myers, Alexei Zakharov, Alexander Beels 2015-02-08 2015-02   Evolution  
N4379 FAQ about N4378, Language Support for Contract Assertions John Lakos, Nathan Myers 2015-02-08 2015-02   Evolution  
N4380 Constant View: A proposal for a std::as_const helper function template ADAM David Alan Martin, Alisdair Meredith 2015-02-05 2015-02   Library  

CppCon 2014 How HHVM Uses Modern C++ for Fun and Profit (Literally)--Drew Paroski

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

How HHVM Uses Modern C++ for Fun and Profit (Literally)

by Drew Paroski

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

HHVM is a just-in-time compiler for PHP used by Facebook to serve billions of requests each day. This talk will give a quick overview of HHVM's history and architecture, followed by a deep dive into what made C++ the language of choice for writing HHVM.

C++ hits a sweet spot between performance and control on one end, and safety, maintainability, and convenience on the other.

The topics we’ll cover will include:
how to call into generated machine code from C++;
taking advantage of C++'s power to control "unsafe" details with memory including how memory is allocated, field size and layout, unions, reinterpret_casts, bit-stealing;
integrating generated machine code with C++ exception handling and C++ profiling tools;
leveraging templates and using the X Macro technique to improve performance and maintainability;
and taking advantage of new C++11 features like unrestricted unions and move constructors.
Finally, we'll go over some obstacles we encountered such as generating machine code that calls C++ virtual methods, and how C++'s superb flexibility allowed us to work around these obstacles.

Call for Papers: C++ track at NDC Oslo 2015, June 17-19

ndc-2015.pngThere was a lot of interest for the very strong C++ track that we hosted at the NDC conference in Oslo last summer. Here is a brief summary of the event, including links to the videos we recorded.

We are repeating the success this year, June 17-19. A few big C++ names has already been signed up, but there is still available slots in the agenda. If you would like to be part of the C++ track this year, please submit your proposal soon.

Call For Papers for NDC Oslo 2015

The CFP closes February 15.

 

Desired compile-time failures--Andrzej KrzemieĊ„ski

Sometimes, an error is what we want:

Desired compile-time failures

by Andrzej Krzemieński

From the article:

However, even though [not introducing breaking changes] works in most of the cases, I believe that this criterion of a “safe addition” is not technically correct, as it fails to take into account an important fact: failure to compile certain programs is a useful, important feature, and if these programs suddenly start to compile, it can cause harm. In this post we will go through the cases where compile-time failure is considered a useful feature...

GCC5 and the C++11 ABI--rhjason

A new article of interest for library developers:

GCC5 and the C++11 ABI

by rhjason

From the article:

The GNU C++ team works hard to avoid breaking ABI compatibility between releases, including between different -std= modes. But some new complexity requirements in the C++11 standard require ABI changes to several standard library classes to satisfy, most notably to std::basic_string and std::list. And since std::basic_string is used widely, much of the standard library is affected...

Overload 125 is now available

ACCU's Overload journal of February 2015 is out. It contains C++ related articles.

Overload 125

From the journal:

Making a Tool of Deception: Is it possible to use modern C++ to make mocking easy? Björn Fahller introduces Trompeloeil, a header-only mocking framework for C++14.

Modern C++ Testing: Various C++ testing framework exist. Phil Nash compares CATCH with the competition.

I Like Whitespaces: Bob Schmidt shares why he thinks whitespaces matters.

CppCon 2014 Modernizing Legacy C++ Code--James McNellis & Kate Gregory

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Modernizing Legacy C++ Code

by James McNellis and Kate Gregory

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

C++ is a programming language with a long, storied history spanning over three decades--four if one includes its C ancestry. The C++ language has undergone many changes during that time, compiler technology has advanced substantially, and computers today are very different from the computers of decades past. But despite all of these advances, there's an awful lot of C++ code in use today that looks like it was written in the 1980s. In some cases, the code was written in the 1980s and it's still in use; in other cases, it's recently-written code that just doesn't use modern style.

In this talk, we'll discuss some of the problems with legacy code, and review some practical techniques for applying principles of modern C++ to gradually improve the quality of legacy code and improve maintainability and debuggability. We'll show how some very small changes to code can yield huge benefits.