Modern C++ for the Windows Runtime

Modern is a header-only library designed to provide Standard C++ developers with first-class access to the modern Windows API. This includes complete support for the Windows Runtime as well as classic APIs such as DirectX.

In the coming weeks I’ll be sharing more about the Modern library but here’s a quick preview of what you can expect. The Modern library provides:

Standard C++ language projection for the Windows Runtime

The most natural way to use the Windows Runtime from C++

The simplest way to use DirectX without compromising performance

A single and consistent library for both DirectX and Windows Runtime APIs

More convenient than using C++/CX or WRL

No overhead compared to using the Windows API directly.

Supported APIs include everything you need to build both immediate-mode and retained-mode apps and games with the best possible performance:

Complete Windows API for Windows Runtime apps

Direct2D

DirectWrite

DirectComposition

DirectX Graphics Infrastructure (DXGI)

Windows Imaging Component

Windows Animation Manager

Consider an example from the Windows Runtime application model. An app must register for the Activated event in order to activate its CoreWindow object. Here’s what it looks like with the Modern library using Standard C++:

Despite the use of a lambda expression in both cases, the second example using C++/CX is not nearly as concise and certainly not very convenient to type. With all of the hats (^) and -> operators it just doesn’t look like modern C++.

Modern is the library you’ve been waiting for to unleash standard C++ for Windows.