Events

CppCon 2015 Call For Open Content -- Jon Kalb

cppcon-026.PNGCppCon isn't just a lecture-based conference, it's an interactive cultural event. Here's an important aspect of CppCon, open to the public:

CppCon 2015 Call For Open Content

by Jon Kalb

From the announcement:

This year CppCon is increasing the number of Open Content sessions. In addition to the early morning and evening sessions offered last year, we’ll also be offering Open Content session over the lunch break.

Open Content is just that, open! Attendees and regular program speakers alike can propose sessions on anything that interests them. These might feature a single facilitator leading a room through an exercise, activity or demo, a panel of 3-5 people taking questions from the room, a “hackathon” on a specific project, or an open conversation among the whole room. The projector is available for slides or note taking.

Open Content is designed for flexibility so that a “Birds of a Feather” talk may be proposed even after the conference has begun. A speaker who gets a lot of post-talk questions may agree to host a Q&A session in the Open Content time. An attendee inspired by a session may host a session to explore a topic further or start on a group implementation of something.

To propose a session, simply email open-content@cppcon.org and tell us the title, description, and speaker(s)/moderators(s). If you have time constraints such as “after a specific session” or “not on the same day as a specific session” let us know in the email. (For example, someone who will be grilled at Grill The Committee on Monday can’t do an open session Monday evening.)

These sessions will be open in another way too -- Open Content does not require conference registration. That’s right, everyone who is in the area is welcome to come and join us for all the evening/lunch sessions, including proposing or leading a session. This is part of our goal to be an inclusive conference for the entire C++ community.

For now, please email your submissions as soon as you can so that our planning work can get underway. See you in Bellevue!

CppCon 2015 Program Highlights, 5 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The C++ language would be far less useful without its tools. The good compilers, the dependancy managers,...

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • Cross-Platform Mobile App Development with Visual C++ 2015
  • Doxygen to DoxyPress : A Journey from C++98 to C++11
  • Beyond Sanitizers
  • What's New in Visual C++ 2015 and Future Directions
  • CLANG + C2 - Engineering/Futures/Measurements

 

Cross-Platform Mobile App Development with Visual C++ 2015 by Marc Gregoire, Software Architect, Nikon Metrology

Visual C++ 2015 supports the development of apps for the Windows platform as well as for Android and iOS. A single code base, possibly with a thin platform-specific UI layer, can be compiled to run on Windows, Android, and iOS. The resulting binary can be published to a device and debugged, all from within Visual C++ 2015. This presentation introduces you to such cross-platform mobile app development, including debugging and emulation, and includes a number of demos.


Doxygen to DoxyPress : A Journey from C++98 to C++11 by Barbara Geller and Ansel Sermersheim, Co-Founders, CopperSpice

This presentation will discuss the benefits of using a documentation generator for creating internal code documentation or end user documentation.  DoxyPress can be used to document your source code, generate API documentation, show class hierarchies, collaboration diagrams, and much more. DoxyPress supports several output formats including html, chm, latex, and man pages.

As part of our talk we will cover the process of redesigning source code originally designed for C++98 and how to migrate it to C++11. We will talk about the advantages and drawbacks of moving to C++11 and show how the code changed in DoxyPress.

We will show a small demonstration of DoxyPressApp, which is a a GUI program used to set up your project file which is then used by DoxyPress to generate documentation.

DoxyPress is a fork of the Doxygen documentation tool. A very basic understanding of C++ will be helpful. No prior knowledge of DoxyPress or Doxygen is required.


Beyond Sanitizers by Kostya Serebryany, Software Engineer, Google

At CppCon’2014 we presented the Sanitizers, a family of dynamic testing tools for C++. These tools allow you to find many stability and security bugs in C++ code, but they are only as good as your tests are. In this talk we will show how to improve your tests with guided fuzzing and how to protect your applications in production even if some bugs were not found. Fuzzing, or fuzz testing, is a surprisingly effective technique that allows you to discover new interesting test inputs. Coverage-guided fuzzing uses coverage-like code instrumentation to make fuzzing orders of magnitude more efficient. Taint-guided fuzzing goes even further by using taint tracking techniques. The next line of defense may be incorporated directly into production: the Control Flow Integrity instrumentation allows you to protect your program from corrupted function pointers (including pointers to virtual tables) and separating stack variables from the call stack protects from corrupted return addresses -- both with near-zero overhead. We will concentrate on particular tools implemented in the opensource LLVM toolchain (libFuzzer, DataFlowSanitizer, -fsanitize=cfi,safe_stack), but will also discuss several alternatives.


What's New in Visual C++ 2015 and Future Directions by Steve Carroll and Ayman Shoukry

In this talk, we'll discuss new features, optimizations, and scenarios in Visual Studio 2015. We'll cover new backend optimizations, improved build throughput, new productivity and diagnostics features, and give a detailed update on our conformance progress, as well as talk about cool new c++1y features that we are shipping from await to modules.

Visual Studio isn't just for Microsoft platform developers. We'll also demonstrate our latest cross platform C++ development features for Android and iOS. We'll also give a sneak peak at our work on combining the Clang frontend with our existing backend to bring Clang support for Windows to Visual Studio.


CLANG + C2 - Engineering/Futures/Measurements by James Radigan

The talk will cover the CLANG + c2.dll compiler for the Microsoft platform. It will contain parts of the talk given at //Build 2015 that can be found on line: "Compiling Objective-C Using the Visual Studio 2015 C++ Code Generation that Builds Windows, SQL, .Net, and Office". The focus this time will be on C++.

The talk will disclose the architecture of how we tied the CLANG open source front end with the Microsoft optimizing backends (several configurations are needed) and how far we are from providing a CTP for public consumption targeting 4 different architectures. Included in this section will be a disclosure of data on compile time, memory consumption, conformance and correctness.

In addition the talk will cover the nuts and bolts of several key innovative compiler and runtime technologies we will be delivering in the Visual Studio 2015 updates (Fall, Winter and Spring). New investments in the compiler and runtime space include: Improved optimization and auto-vectorization, more secure code generation, incremental whole program compilation, and new asynchronous C++ code generation.

CppCon 2015 Program Highlights, 4 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The C++ possess another language inside it: the template language. It is useful for a lot of things, from writting less code to compile time computations or checks, but can lengthen compile time too. To master it is not easy.

The following interrelated CppCon 2015 talks tackle these issues and more (part 2).

In this post:

  • Compile-time tools supporting generic programming in C++
  • C++ metaprogramming: a paradigm shift
  • Pruning Error Messages From Your C++ Template Code
  • C++ Metaprogramming: Journey from simple to insanity and back
  • boo{stache} exposed : the inner-workings of a generic template engine

 

Compile-time tools supporting generic programming in C++

Generic programming is a programming paradigm which makes it possible to build highly extensible and efficient libraries. In C++ it can be implemented using templates, therefore developers and users of generic libraries need to understand how the compiler works with templates. The details are important when the code using a library instantiates different templates (or specialisations), or the same templates but with different arguments as expected. Fixing such bugs can lead to difficult debugging sessions. These are not bugs in the program's runtime behaviour. These are bugs in the program's compile-time behaviour and therefore different tools are needed to find them. Tools providing insight into what happens during the compilation process are needed.

Template metaprogrammers have been pushing the limits of what is possible using templates. The way they use templates is usually more complex than what generic libraries need. Recently a number of advanced tools supporting template metaprogrammers have been built. REPL shells, debuggers, profilers are available to make it possible to see what happens during compilation.

This talk presents how these tools can be used and be useful for the developers and users of generic libraries. Insight into what happens inside the compiler can be extremely useful to understand why the code compiles slowly, behaves the way it does or to debug errors in code using generic libraries.


C++ metaprogramming: a paradigm shift

Most people think metaprogramming is hard. It isn't; we just didn't have the right tools for it. This talk will present a new way of metaprogramming using the same syntax as that of normal C++. It will show how the runtime and the compile-time boundaries can be crossed almost seamlessly. It will show how compilation times can be reduced without sacrificing expressiveness. It will introduce Hana [1], a newly accepted Boost library using cutting edge features of the language in a creative way to solve the problem of metaprogramming for good.

[1]: http://github.com/ldionne/hana


Pruning Error Messages From Your C++ Template Code

Many template libraries are regarded with ambivalent feelings by developers: On the one hand, such libraries can offer wonderful functionality. On the other hand, they are dreaded for the sheer amount of error messages spilled out by the compiler when there is even a small bug in the developer's code. This talk will demonstrate several techniques to drastically reduce the amount of compiler output in case of errors (with real-life examples, of course).


C++ Metaprogramming: Journey from simple to insanity and back

Part I: Introduction to template metaprogramming. Template metaprogramming is a variant of generic programming, a technique that uses C++ template mechanism to perform computations at compilation time, usually to generate, from a single description, executable code that depends on the properties of the data types. It can be viewed as “programming with types”. In this example-driven class we start with the overview of the metaprogramming tools (everything you wanted to know about template specializations but were afraid to ask). We will apply these tools to simple examples, such as: how to sort a sequence in order of increasing values, unless it’s a sequence of pointers, in which case we want the values of what they point to. Part II: Advanced techniques and practical applications. Simple examples of metaprogramming are fun and useful, but once you master them you start chafing at the limitations. This is C++, where we don’t suffer limitations gladly. We therefore move on to the more advanced techniques, including SFINAE, and the appropriately more advanced examples. The journey takes us back to the beginning: after all, when sorting a sequence of values vs a sequence of pointers, you don’t really care whether the pointer is smart or dumb. What you really want to know is whether “*p” compiles or not. What you really need is an “if_compiles” metaprogramming function.


boo{stache} exposed : the inner-workings of a generic template engine

Template engines are commonly found generating web pages, customer reports, or even source code. They take a source template and data model as input and generate some desired output.

Boostache was started as the Library in a Week challenge from CppNow'14 with initial support for Mustache.

Today Boostache supports multiple template formats and adapts automagically at compile time to user defined data models. Many of the techniques utilized in Boostache are the same that Ciere has employed in custom IDL compilers, Domain Specific Language systems, compilers, and runtimes.

This talk will briefly introduce Boostache and then delve into the internal architecture and design of the library. We will explore some implementation details of the parser, compiler, virtual machine, and generic data model infrastructure with the goal to expose useful techniques and patterns from this C++11 code base that can be used in your own libraries and applications.

CppCon 2015 hotels filling up

cppcon-031.PNGIf you're registered for CppCon (or going to be), make sure you book your hotel soon. If you leave booking till the week before the conference it's likely you'll have to stay someplace a few miles away because downtown Bellevue is a popular spot in September and all hotels within reasonable walking distance of CppCon are expected to be fully booked by the time of the event.

Last year's CppCon was well attended, and registration is stronger this year. Three of the four CppCon hotel room blocks are now sold out. The final CppCon negotiated room rate block expires on Monday at noon PST.

The announcement:

Hotel Room Shortage Predicted

Book Now!

Our contacts at the official conference hotels are predicting that, like last year, all hotel rooms in Bellevue will be booked.

Currently three of our four hotel blocks are full. The Marriott still has some rooms that we’ve reserved for attendees. Originally they had agreed to hold these rooms (at a conference discounted rate) until this Friday, but they’ve agree to extend the deadline to Monday (August 24th) at noon (west coast time).

We strongly encourage anyone planning to attend this year’s conference to book your room right away.

CppCon 2015 Program Highlights, 3 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The C++ possess another language inside it: the template language. It is useful for a lot of things, from writting less code to compile time computations or checks, but can lengthen compile time too. To master it is not easy.

The following interrelated CppCon 2015 talks tackle these issues and more (part 1).

In this post:

  • Expression Templates - What, Why, When, Where
  • Visualizing Template Instantiations - Templator Demo
  • Variadic Templates - Guidelines, Examples and Compile-time computation
  • Variable Templates - C++14 compile-time computation
  • How I stopped worrying and love metaprogramming

 

Expression Templates - What, Why, When, Where - Part I, Part II, Part III

Expression Templates is one of this C++ idiom people learn to either love or hate. The main issues with ET is that everubody has its own conception about what they are, when they should be used, what benefits they give and what are their trade off. For a long time, Expression Tempaltes has been seen has a way to improve temporary heavy code. If the seminal implementation of ET by Todd Veldhuizen was actually about this, the landscape has changed since C++11 and C++14.

This workshop will go over : - what are exactly Expression Templates and what kind of use case they can solve elegantly and efficiently - what are the benefits that one may reap by using expression tempalte in its library - what are the real cost of expressont empaltes both at runtime and compile-time - which tools to use to not reinvent the tempalte wheel everytime including an introduction to Boost.PROTO an Boost.HANA.

The main objective is to clarify why, even in C++1*, this idiom has a meaningful set of applciations and how to navigate around its pitfalls.


Visualizing Template Instantiations - Templator Demo

Many C++ beginners shy away from employing templates in their code, because of the myth of templates being hard. Even seasoned C++ developers can have problems manually interpreting template code correctly as Olve Maudal's C++ pub quiz demonstrates. Overloads and template specializations make it hard for programmers and also IDEs to show a developer what happens without compiling a program and even with a compile one might not get, what actually happens unless an unintelligible error message from your compiler appears.

My students tried to alleviate that problem by visualizing template instantiation and overload selection in a C++ IDE and allow to navigate through template code in instantiation context that a compiler would only create internally and that is otherwise not available for humans. While still in its nascent state I hope to show what is possible and if things go as planned at the time of the submission you should be able to solve the template pub quiz questions without running the programs.


Variadic Templates - Guidelines, Examples and Compile-time computation

Writing class templates and functions accepting a variable number of arguments has been a burden before C++11. With variadic templates, both class templates with a variable number of arguments as well as functions can be formulated much easier and more type safe way.

Nevertheless, the authoring of variadic templates can be challenging for the uninitiated. Even the interpretation of variadic template code can be a problem, as Olve Maudal's famous pub quiz shows.

This session will build up understanding and the ability to use and author variadic template functions and variadic template classes from easy examples up to more complicated applications such as employing std::forward correctly, std::integer_sequence and other upcoming language features such as a template UDL operator that bridges the gap between string literals and std::integer_sequence.

Understanding pack expansion, sizeof... and other hard to get on first sight issues are my goal. In the end you should have seen guidelines that help you avoid the template instantiation trap from the pub quiz and correct usage of std::forward in your variadic templates.


Variable Templates - C++14 compile-time computation

C++11 introduced Variadic Templates, constexpr Functions and Literal Types that ease and allow type-safe computations at compile time. For embedded development this is an important aspect, because it provides a means to create ROMable data in type-safe C++.

In combination with C++14 mechanism of Variable Templates, that actually defines constants, and the relaxed constexpr function rules there are unprecedented possibilities for compile-time computations.

This talk does not only show the mechanisms available but also demonstrates non-trivial examples, how they can be used to compute interesting data at compile time.


How I stopped worrying and love metaprogramming

Horrible software engineering technique conceived in the forge of Hell or the Only True Way of doing C++ in 2015, template metaprogramming and its cohort of companion techniques are sure to create animation in a group of programmers.

What if we were to tell you that an actual software product, actually sold to real customers and in production for now several years has been built on it? What if we were to tell you that a lot of advanced template techniques helped us to build a better software faster?

This talk is all about real life examples of template metaprogramming, why they are useful and when and how you could use them in your own projects.

CppCon 2015 Program Highlights, 2 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The standard template library (STL) is an important part of the C++ language. Knowing what there is inside and how to use it is an important part to create a program.

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • STL Algorithms in Action
  • Enhancing STL containers
  • C++11/14/17 Atomics the Deep dive: the gory details, before the story consumes you!
  • Parallelizing the C++ Standard Library
  • Ranges and the Future of the STL

 

STL Algorithms in Action

This will be an entertaining trip through the STL algorithms, where we will view many of them in their natural habitats, going about their natural algorithm business. Then we will take some of them out of their native environments and make them do tricks that are entirely unexpected. In the end, you will gain a new appreciation for what the algorithms are and how pervasively they can be used throughout your code.

 

Enhancing STL containers

STL has a big history. Due to class paradigm of C++, many STL containers have a flat layout in memory, i.e. containers naturally store objects and address objects rather than their indexing entities such as smart pointers (which are, strictly speaking, objects too). This model has a benefit of lower memory fragmentation, that causes better CPU cache performance. However, many tasks in real life require reordering of objects, that requires compexity of O(n*q), where q is a size of an object and n is a compexity measured in operations. Thus, some imlementations of operations with reordering objects in some containers are much slower that they could be. This problem could sometimes be solved by storing “pointers” as index entities in containers instead of the objects by themselves, what improves performance by q times, but causes memory fragmentation and worse cache performance. Algorithmically, the solution with pointers is obviously better, but it is still not the most efficient one. In the presentation I will show myimplementations of containers using both approaches and having the best of two worlds. I will compare these methods with classical and modern approaches and draw some conclusion, encouraging everybody to use the power of algorithms with C++.

 

C++11/14/17 Atomics the Deep dive: the gory details, before the story consumes you!

In 2011, C++11 atomics offered three memory models but 6 settings. Most compilers have started implementing most of these (relaxed, seq_cst, acquire, release, acq_rel) but not consume (For that you will need to see Paul's talk which naturally follows this talk.) For this, I will deep dive into what each memory model setting means (especially for Games Development and low latency, a new SG14 in the C++ Standard) and how C++11 atomics are used to improve handling of mutable shared state. We have improved on it in C++14 and have more crazy things planned for C++17. I will also look at how C++ atomics are a natural precursor to SG5's Transactional Memory which was approved in Lenexa for publication.

 

Parallelizing the C++ Standard Library

As the era of frequency scaling comes to an end, multi-core parallelism has become an essential focal point in computational research. Mainstream languages, however, have not yet adapted to take full advantage of parallelism provided by the hardware. While new languages such as Rust and Swift are catching on and implementing multi-core algorithms in their libraries, C++ has only started to do so. A parallel Standard Library could bring with it many positive features that users can begin taking advantage of.

This talk will focus around two standards proposals, N4409 and N4406. N4409 outlines the details of a parallel Standard Library and features of these new parallel algorithms. The complementary N4406 outlines abstractions to take advantage of various mechanisms for parallel execution. We will cover the reasons why the new Standard Library would be beneficial to C++ users and our experience implementing these algorithms in HPX. The presentation will address what exactly the two proposals define, the challenges we faced, and the results we collected. In addition, we will discuss extensions made to these proposals and the C++11/14 standard in HPX to support these semantics in a distributed environment.

 

Ranges and the Future of the STL

Range-based interfaces are functional and composable, and lead to code that is correct by construction. With concepts and ranges coming to the STL, big changes are in store for the Standard Library and for the style of idiomatic C++. The effort to redefine the Standard Library is picking up pace. Come hear about one potential future of the STL from one of the key people driving the change.

CppCon 2015 Keynote #2: Better Code -- Data Structures (Sean Parent)

cppcon-040.PNGThe CppCon 2015 program is already chock-full of strong topics and speakers, with a handful of the big talks still to be announced. Here's another of those...

From the announcement:

Keynote: Sean Parent

We are announcing the second keynote for next month’s conference.

Sean Parent, principal scientist at Adobe, will be continuing his “Better Code” keynote series from last year’s C++Now keynote (on complete types) with “Better Code: Data Structures.”

Abstract: The standard library containers are often both misused and underused. Instead of creating new containers, applications are often structured with incidental data structures composed of objects referencing other object. This talk looks at some of the ways the standard containers can be better utilized and how creating (or using non-standard library) containers can greatly simplify code. The goal is no incidental data structures.

Speakers bio: Sean Parent is a principal scientist and software architect for Adobe’s mobile digital imaging group. Sean has been at Adobe since 1993 when he joined as a senior engineer working on Photoshop and later managed Adobe’s Software Technology Lab. In 2009 Sean spent a year at Google working on Chrome OS before returning to Adobe. From 1988 through 1993 Sean worked at Apple, where he was part of the system software team that developed the technologies allowing Apple’s successful transition to PowerPC.

CppCon 2015 Program Highlights, 1 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

There is lots -- lots -- of existing C++ code. How can you effectively bring existing C++ code forward to C++11/14? How can you upgrade your coding styles and conventions? How can tools help you and your team to use correct modern C++ in your production projects?

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • Keynote: Writing Good C++14 (Bjarne Stroustrup)
  • Plenary: Writing Good C++14 By Default (Herb Sutter)
  • A Few Good Types: Evolving array_view and string_view For Safe C++ Code (Neil MacIntosh)
  • More than Lint: Modern Static Analysis For C++ (Neil MacIntosh)

 

Keynote: Writing Good C++14

How do we use C++14 to make our code better, rather than just different? How do we do so on a grand scale, rather than just for exceptional programmers? We need guidelines to help us progress from older styles, such as “C with Classes”, C, “pure OO”, etc. We need articulated rules to save us from each having to discover them for ourselves. Ideally, they should be machine-checkable, yet adjustable to serve specific needs.

In this talk, I describe a style of guidelines that can be deployed to help most C++ programmers. There could not be a single complete set of rules for everybody, but we are developing a set of rules for most C++ use. This core can be augmented with rules for specific application domains such as embedded systems and systems with stringent security requirements. The rules are prescriptive rather than merely sets of prohibitions, and about much more than code layout. I describe what the rules currently cover (e.g., interfaces, functions, resource management, and pointers). I describe tools and a few simple classes that can be used to support the guidelines.

The core guidelines and a checker tool reference implementation will be open source projects freely available on all major platforms (initially, GCC, Clang, and Microsoft).

Use, comment, and contribute!

Speaker: Bjarne Stroustrup, Managing Director, Morgan Stanley. Stroustrup is the creator and original implementer of C++. He is also a Visiting Professor in Computer Science at Columbia University, a Distinguished Research Professor in Computer Science at Texas A&M University, and continues to actively participate and lead language evolution in the ISO C++ committee.

 

Writing Good C++14 By Default

Modern C++ is clean, safe, and fast. It continues to deliver better and simpler features than were previously available. How can we help most C++ programmers get the improved features by default, so that our code is better by upgrading to take full advantage of modern C++?

This talk continues from Bjarne Stroustrup’s Monday keynote to describe how the open C++ core guidelines project is the cornerstone of a broader effort to promote modern C++. Using the same cross-platform effort Stroustrup described, this talk shows how to enable programmers write production-quality C++ code that is, among other benefits, type-safe and memory-safe by default -- free of most classes of type errors, bounds errors, and leak/dangling errors -- and still exemplary, efficient, and fully modern C++.

Background reading: Bjarne Stroustrup’s 2005 “SELL” paper, “A rationale for semantically enhanced library languages," is important background for this talk.

Speaker: Herb Sutter, author and chair of the ISO C++ committee.

 

A Few Good Types: Evolving array_view and string_view for Safe C++ Code

The Library Fundamentals TS already contains a string_view type, and possibly soon an array_view type. These are important and should be used pervasively as function parameters, especially instead of (pointer, length) pairs which are generally unsafe. They offer additional benefits in the form of decoupling: allowing functions to be specified in terms of high-level views rather than references to specific, concrete string and container types which bind both caller and callee to a specific implementation detail. As a specific example, using string_view in function signatures allows them to be called with any of the endless proliferation of string types that exist in codebases today (std::string, CStringT, char*, BSTR, HSTRING, MyString etc).

We can and should evolve these types further as a key part of achieving memory safety for C++ code.

This example-driven talk shares our experience with preventing defects in large-scale commercial C++ codebases by applying modestly evolved versions of the proposed array_view and string_view types, plus a small number of related types such as not_null. Adopting these types enables simpler and safer code that eliminates important classes of defects by construction. The types are carefully designed to have usually exactly zero space and time overhead over the current unsafe idioms they replace, so as to leave no valid performance reason against adopting them. Using these types enables high-quality static analysis, and is allowing Microsoft to fully replace non-standard and non-portable annotation systems for type and memory safety in our own code bases.

We believe this approach is generally applicable to code at all levels, from application code down to the most performance-sensitive systems code. An open source reference implementation of the types that supports all major compilers and platforms will be available on GitHub.

More than Lint: Modern Static Analysis for C++

Static analysis tools have the potential to significantly improve programmer productivity as well as the safety, reliability and efficiency of the code they write. Modern static analysis has moved well beyond the mental model people often have based on “lint”: just finding simple “typos” or “thinkos”. Static analysis can find subtle, complex bugs early, identify opportunities to improve performance, encourage consistent style and appropriate usage of libraries and APIs.

This talk will look at the different purposes static analysis tools can be used to meet all these different goals. It will present specific examples from our experience working with sophisticated analysis tools on large, commercial codebases. The talk will also present a specific implementation of a modern static analysis toolkit for C++. This toolkit is being used in a number of different contexts: to provide tool-based enforcement of new coding guidelines and rules, to migrate people to modern C++ coding idioms and to find important security and reliability defects. One notable example of its use is to implement the checker for enforcement of a core set of coding guidelines that are presented in Bjarne Stroustrup’s keynote address.

Some of the tools described in the talk will be available for download as a Community Technology Preview in the latter part of 2015.

Speaker: Neil MacIntosh, Microsoft. Neil is the lead for the C++ static analysis frameworks used widely within Microsoft, including PREfix, PREfast, and ESPx, and is currently involved on making them work better with portable C++14 code rather than nonstandard annotations.

CppCon 2015 program additions posted

cppcon-046.PNGFrom the cppcon.org announcement:

2015 Program Additions

Most of this fall’s program is already online, but we are still working on it. Today we are announcing three new sessions and a panel.

Herb Sutter will be presenting “Writing Good C++14 By Default.” Herb’s session will build on Bjarne Stroustrup’s keynote of the previous day on “Writing Good C++14.”

Chandler Carruth, C++ Language and Compiler Lead at Google, will be presenting “Tuning C++: Benchmarks, and Compilers, and CPUs! Oh My!

Sumant Tambe will be presenting “Reactive Stream Processing in Industrial IoT using DDS and Rx.cpp,” which includes a live demo of a distributed complex event processing system for Internet of Things.

Our Monday evening panel will be Grill the Committee, featuring the opportunity for audience members to question members of the ISO C++ committee. We’ve not yet identified the panel members, but last year’s panel featured a dozen committee members and we’ll have a similar panel this year.