CppCast Episode 74: C++/WinRT with Kenny Kerr

Episode 74 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Kenny Kerr from Microsoft to discuss the C++/WinRT library, previously known as ModernCpp, a standard C++ projection for the Windows Runtime.

CppCast Episode 74: C++/WinRT with Kenny Kerr

by Rob Irving and Jason Turner

About the interviewee:

Kenny Kerr is an engineer on the Windows team at Microsoft, an MSDN Magazine contributing editor, Pluralsight author, and creator of moderncpp.com (C++/WinRT). He writes at kennykerr.ca and you can find him on Twitter at @kennykerr.

C++ Core Check code analysis is included with VS “15”--Andrew Pardoe

Following the core guidelines is becoming easier.

C++ Core Check code analysis is included with VS “15”

by Andrew Pardoe

From the article:

Visual Studio “15” Preview 5 now includes the C++ Core Guidelines Checkers. This means you no longer have to install the C++ Core Check package from NuGet to check your code against rules and profiles in the C++ Core Guidelines. Just configure Code Analysis to include the C++ Core Check extensions.

camomilla: C++ error simplification script - - Vittorio Romeo

Article covering "camomilla", a Python script designed to post-process heavily-template-based C++ errors in order to make them easier to read.

camomilla: C++ error simplification script

by Vittorio Romeo

From the article:

camomilla uses simple text transformations to make gcc and clang errors smaller and easier to read. [...] The main text transformation used by camomilla to prevent full expansion of templates is "template typename collapsing", which hides nested typenames up to a user-specified depth. [...] The two other current transformations offered by camomilla are simple regex replacements that can act on namespaces or generic symbols. They can be defined in .json configuration files (which can recursively include each other!) [...] camomilla helps with [continuously transforming the same error] by automatically caching the last processed original error, so that the user can play around with different transformations and options.

rest_rpc released the first official version

The C++ open source community released (purecpp.org) released theit first official version.

rest_rpc website

by purecpp,org

From the website:

rest_rpc is developed using modern c++. The first version was released after several iterations and refactoring. rest_rpc is an easy to use, flexible, high-performance, cross-platform RPC framework.

Features of rest_rpc

  • RPC call just like local function call
  • Easy to use: developers only need to focus on business
  • Flexible: the serialization method can be freely customized, default support json,msgpack
  • Supports synchronous and asynchronous calls

DLib 19.2 released

Today a new version of DLib is available:

DLib 19.2 released

Release notes

by Davis King

From the article:

... So the obvious thing to do was to add an implementation of MMOD with the HOG feature extraction replaced with a convolutional neural network.  The new version of dlib, v19.2, contains just such a thing.  On this page you can see a short tutorial showing how to train a convolutional neural network using the MMOD loss function.  It uses dlib's new deep learning API to train the detector end-to-end on the very same 4 image dataset used in the HOG version of the example program.  Happily, and very much to the surprise of myself and my colleagues, it learns a working face detector from this tiny dataset.

Optimizing return values--Marco Foco

Marco Foco shows different solutions and tradeoffs to a dangling reference problem:

Optimizing return values

    by Marco Foco

From the article:

As you can see, class C contains a function get() which returns a reference to its internal state. In normal code, we must take care not to use this reference after our class has been destroyed...

Quick Q: Is the 'override' keyword just a check for a overriden virtual method?

Quick A: Yes.

Recently on SO:

Is the 'override' keyword just a check for a overriden virtual method?

That's indeed the idea. The point is that you are explicit about what you mean, so that an otherwise silent error can be diagnosed:

struct Base
{
    virtual int foo() const;
};

struct Derived : Base
{
    virtual int foo()   // whoops!
    {
       // ...
    }
};

The above code compiles, but is not what you may have meant (note the missing const). If you said instead, virtual int foo() override, then you would get a compiler error that your function is not in fact overriding anything.