CppCon 2016: Embracing Standard C++ for the Windows Runtime--Kenny Kerr & James McNellis

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:

Embracing Standard C++ for the Windows Runtime

by Kenny Kerr & James McNellis

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Believe it or not, avoiding language extensions and embracing modern C++ will make it easier for you to write code for Windows. The Universal Windows Platform in Windows 10 provides the ability for developers to write apps for many devices in many languages. To achieve this goal, it uses the Windows Runtime platform technology to expose functionality from the operating system into languages, including C++. Microsoft wants to make the Windows Runtime naturally and easily available to standard C++ developers. "C++/WinRT" (formerly moderncpp.com) is a standard C++ library and toolset currently under development at Microsoft. It includes a standalone compiler, which converts Windows Runtime metadata into a header-only library. The source code uses standard syntax consumable by any C++ compiler, making it easier for developers to use Windows Runtime APIs from C++.

We will begin this session with the goals of the "C++/WinRT" project. We'll look at the primitives of the Windows Runtime ABI and how this C++ library provides a natural projection of those primitives. We'll look at how C++11 and C++14 language features make it easier to encapsulate the COM infrastructure that underpins the Windows Runtime. Finally, we'll look at how we've optimized the implementation and discuss how a handful of compiler optimizations can make this C++ library efficient and effective for building a wide range of applications.

C++ Weekly Episode 70: C++ IIFE in quick-bench.com—Jason Turner

Episode 70 of C++ Weekly.

C++ IIFE in quick-bench.com

by Jason Turner

About the show:

We are commonly taught to const everything that we can in C++. One way to accomplish this goal in the post-C++11 world is to use a immediately invoked lambda (equivalent to an IIFE in the JavaScript world) that generates a value for us, which we assign to a const value. But what impact does this design decision have on the quality of code generated and the performance? In this episode of C++ Weekly we use the new website quick-bench to test the various options available.

The rise of the new language MC++--CppDepend Team

A new language?

The rise of the new language MC++

by CppDepend Team

From the article:

During  the last few years we talk about the “C++ Renaissance”. We have to admit that Microsoft was a major actor of this movement, I remember this video where Craig Symonds and Mohsen Agsen talked about it.

In 2011 Microsoft announced in many articles the come back of C++, and Microsoft C++ experts like Herb Sutter did many conferences to explain why C++ is back and mostly recommend the use of Modern C++. In the same time the standard C++11 was approved and we begin to talk about  C++ as new  language...

C++17 in details: Templates--Bartlomiej Filipek

What's new in C++17?

C++17 in details: Templates

by Bartlomiej Filipek

From the article:

Do you work a lot with templates and meta-programming?
With C++17 we get a few nice improvements: some are quite small, but also there are notable features as well! All in all, the additions should significantly improve writing template code.

Today I wrote about:

  • Template argument deduction for class templates
  • template<auto>
  • Fold expressions
  • constexpr if
  • Plus some smaller, detailed improvements/fixes

BTW: if you’re really brave you can still use concepts! They are merged into GCC so you can play with them even before they are finally published.

CppCon 2016: Deploying C++ modules to 100s of millions of lines of code--Manuel Klimek

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:

Deploying C++ modules to 100s of millions of lines of code

by Manuel Klimek

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Compile times are a pain point for C++ programmers all over the world. Google is no exception.. We have a single unified codebase with hundreds of millions of lines of C++ code, all of it built from source. As the size of the codebase and the depth of interrelated interfaces exposed through textually included headers grew, the scaling of compiles became a critical issue.

Years ago we started working to build technology in the Clang compiler that could help scale builds more effectively than textual inclusion. This is the core of C++ Modules: moving away from the model of textual inclusion. We also started preparing our codebase to migrate to this technology en masse, and through a highly automated process. It's been a long time and a tremendous effort, but we'd like to share where we are as well as what comes next.

In this talk, we will outline the core C++ Modules technology in Clang. This is just raw technology at this stage, not an integrated part of the C++ programming language. That part is being worked on by a large group of people in the ISO C++ standards committee. But we want to share how Google is using this raw technology internally to make today's C++ compiles faster, what it took to get there, and how you too can take advantage of these features. We will cover everything from the details of migrating a codebase of this size to use a novel compilation model to the ramifications for both local and distributed build systems. We hope to give insight into the kinds of benefits that technology like C++ Modules can bring to a large scale C++ development environment.

CppCast Episode 107: and move semantics with Howard Hinnant

Episode 107 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Howard Hinnant from Ripple to talk about <chrono>, his date & time library (and proposal) and his work on move semantics.

CppCast Episode 107: <chrono> and move semantics with Howard Hinnant

by Rob Irving and Jason Turner

About the interviewee:

Howard Hinnant is a Senior Software Engineer at Ripple and the lead author of several C++11/14 features including: move semantics, unique_ptr, chrono, condition_variable_any, shared_mutex and std::lock. He is also the lead author of two LLVM projects libc++ and libc++abi.

Making things do stuff – Part 6--Glennan Carnie

The series continues.

Making things do stuff – Part 6

by Glennan Carnie

From the article:

As code designers we tend to eschew specific ‘stove-pipe’ code in favour of reusable code elements.  Up until now we’ve been coding some very specific examples so it’s probably worth looking at some more generic solutions.

In this article we’ll look at building generic register manipulation classes (or, as one commenter referred to them, ‘register proxy’ classes).  Here, we’re really exploring code design rather than coding ‘mechanics’.  I’m using this to explore some factors like the balance between efficiency, performance and flexibility...