community

CppCon 2016: Examining applications that do not terminate on std::bad_alloc--Sergey Zubkov

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2016 for you to enjoy. Here is today’s feature:

Examining applications that do not terminate on std::bad_alloc

by Sergey Zubkov

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

System memory holds a special place in the hierarchy of program resources; its availability is the implied precondition for many innocuous lines of code, from std::string::substr() to passing std::function<> by value. The ability to always create another object is ingrained in the OOP mindset so much that it is often said that immediate termination is the cleanest way to handle memory allocation failures in most situations. Nevertheless, C++, when consistently applying RAII, makes it possible to treat memory allocation exactly as any other resource acquisition.

To what degree do actual applications take advantage of that possibility and what responses to allocation failures are there in the wild? This presentation will examine over 300 open source projects that incorporate explicit handling for std::bad_alloc, examine the causes (it’s not always “out of memory”), response strategies (it’s more than just rollback), and related practical considerations.

Trip report: Evolution Working Group at the Summer ISO C++ standards meeting Toronto--Andrew Pardoe

The evolution does not stop.

Trip report: Evolution Working Group at the Summer ISO C++ standards meeting (Toronto)

by Andrew Pardoe

From the article:

The Summer 2017 ISO C++ standards meeting was held in July 10-15 at the University of Toronto. Many thanks to Google, Codeplay, and IBM for sponsoring the event, as well to folks from Mozilla, Collège Lionel-Groulx, Christie Digital Systems, and Apple for helping to organize. And, of course, we very much appreciate Waterfront International for sponsoring a banquet at the CN Tower.

CppCon 2016: GDB - A Lot More Than You Knew--Greg Law

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2016 for you to enjoy. Here is today’s feature:

GDB - A Lot More Than You Knew

by Greg Law

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

If you’re writing C++ for anything other than Windows, chances are that you occasionally break out GDB. This session presents some of the lesser known features of GDB that can change the way you debug. GDB has come a long way in the last few years and now does so much more than break, print, step and continue. Reversible debugging; Non-Stop Mode; Multi-process Debugging; and Dynamic Printf are but some of its best features, and its built-in Python scripting is particularly powerful. Join Undo co-founder and CEO, Greg Law, as he takes you through a series of demos to show some amazing tricks with GDB and some of its powerful new (and not-so-new) features that you may not have heard of.

CppCon 2016: There and Back Again: An Incremental C++ Modules Design--Richard Smith

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2016 for you to enjoy. Here is today’s feature:

There and Back Again: An Incremental C++ Modules Design

by Richard Smith

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

The Clang project has been working on Modules in one form or another for many years. It started off with C and Objective-C many years ago. Today, we have a C++ compiler that can transparently use C++ Modules with existing C++ code, and we have deployed that at scale. However, this is very separate from the question of how to integrate a modular compilation model into the language itself. That is an issue that several groups working on C++ have been trying to tackle over the last few years.

Based on our experience deploying the core technology behind Modules, we have learned a tremendous amount about how they interact with existing code. This has informed the particular design we would like to see for C++ Modules, and it centers around incremental adoption. In essence, how do we take the C++ code we have today, and migrate it to directly leverage C++ Modules in its very syntax, while still interacting cleanly with C++ code that will always and forever be stuck in a legacy mode without Modules.

In this talk we will present our ideas on how C++ Modules should be designed in order to interoperate seamlessly with existing patterns, libraries, and codebases. However, these are still early days for C++ Modules. We are all still experimenting and learning about what the best design is likely to be. Here, we simply want to present a possible and still very early design direction for this feature.

Quick Q: How to (and who can) implement the standard library features defined by the C++ committee?

Quick A: Everyone by reading and applying the C++ standard.

Recently on SO:

How to (and who can) implement the standard library features defined by the C++ committee?

The committee does not release any reference implementations. In the early days, things got standardized and then the tool developers went away and implemented the standard. This has changed, and now the committee looks for features that have been implemented and tested before standardization.

Also major developments usually don't go directly into the standard. First they become experimental features called a Technical Specification or TS. These TS may then be incorporated into the main standard at a later date.

You are free to write you own implementation of the C++ standard library. Plum Hall has a test suite (commercial, I have no connection, but Plum Hall are very involved with C++ standardization).

I don't see any issue with not being conformant. Almost all implementations have some extensions. Just don't make any false claims, especially if you want to sell your product.

If you're interested in getting involved, this can be done via your 'National Body' (ANSI for the USA, BSI for the UK etc.). The isocpp web site has a section on standardization which would be a good starting place.

Announcing the Student and Accessibility tickets for Meeting C++ 2017!

The programs for student and accessibility tickets are open until October 15th!

Announcing the Student and Accessibility tickets

by Jens Weller

From the article:

This is the 4th year where Meeting C++ is offering free tickets for students. Since last year, there is also a contingent for the underrepresented and those, not able to afford a Meeting C++ ticket.

CppCon 2016: Make Friends with the Clang Static Analysis Tools--Gabor Horvath

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2016 for you to enjoy. Here is today’s feature:

Make Friends with the Clang Static Analysis Tools

by Gabor Horvath

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

This talk is an overview of the open source static analysis tools for C++. The emphasis is on Clang based tools. While this talk is not intended to be a tutorial how to develop such tools I will cover the algorithms, methods and interesting heuristics that are utilized by them. Understanding these methods can be really useful as it helps us write more static analysis friendly code and understand the cause of false positive results. It will also help to understand limitations of the currently available tools. I will also present some guidelines how to make a library static analysis friendly, to make clients interested in such tools happy. I will also give a short tutorial on how to use these tools and how to integrate them into the work flow.