September 2017

Automatic two-phase init—Krzysztof Ostrowski

Deferred initialisation for classes that inherit constructors, or Automatic two-phase init.

Deferred initialisation for classes that inherit constructors

by Krzysztof Ostrowski

From the article:

Constructor inheritance through using-declaration is a powerful technique that can be easily used to introduce pre-defined behaviour to custom types. As an example, consider a generic visitor design pattern implementation that is parametrised by the names of visitable types, and an unique tag that identifies given visitor template instance. Such an instance can be "mixed-in" into a custom type D by simply deriving from it... and inheriting its constructors to make it behave as it would be a Visitor template instance itself:

struct D
  : Visitor<
        A         // the tag
      , X, Y, Z   // "list" of visitable types
    using Visitor::Visitor;
What if there is a need to run an "additional" initialisation code as it would be run in the D constructor if one were there? Bjarne Stroustrup suggests member-initializers that do half of a work we would like to do here. While direct member initialisation sets required initial values for all the members (except bit field members), it does not offer a direct way to execute custom code that makes use of those members, the custom code that typically resides in the constructor's body.
This article presents a solution that enables injection of a custom code to be executed once all the non-static members are initialised.

Two-phase name lookup support comes to MSVC—Andrew Pardoe

What two-phase name lookup entails, what’s currently implemented in MSVC, and how to make effective use of MSVC’s partial but substantial support for two-phase name lookup:

Two-phase name lookup support comes to MSVC

by Andrew Pardoe

From the article:

“Two-phase name lookup” is an informal term that refers to a set of rules governing the resolution of names used in a template declaration...

LLVM 5.0 Released

The 5th major version of the LLVM compiler infrastructure was released.

LLVM 5.0 Released

by the LLVM Team

About the release:

The Clang releated changes are documented on an extra page.

C++ coroutines are the major new feature. Beside that, C++17 feature implementation has been completed.



Concept Requirements—EverythingCpp

The new C++ feature defined in Concept TS, the 'concept' allows for a variety of forms of requirements to be written. This video details those forms, with an example of how they may be applied, and why.

Concept Requirements

by EverythingCpp

About the video:

Continuing on the topic of Concepts from previous videos, this video details the types of requirements usable in a concept, how to write them, and how they may be used.

New C++ YouTube Channel (CopperSpice)

New C++ channel on YouTube:

YouTube Channel (CopperSpice)

by Barbara Geller and Ansel Sermersheim

About the channel:

We would like to announce our YouTube channel which we started in July. New content was added today and our goal is to post a new video every other Thursday. Videos will be about C++, CopperSpice, DoxyPress, open source, pair programming, managing a software business, and subjects related to our work. Please subscribe and we look forward to your feedback.

CppCast Episode 117: DebugView++ with Jan Wilmans

Episode 117 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Jan Wilmans to talk about the DebugView++ debug and logging tool and some of his other open source projects.

CppCast Episode 117: DebugView++ with Jan Wilmans

by Rob Irving and Jason Turner

About the interviewee:

Jan is a Software Engineer at Promexx, contracted by ThermoFisher Scientific to work on integration of motion controller in Transmission Electron Microscopes. He has been programming for 25 years, started with basic, z80 assembly and later C++. He is now a C++ enthusiast, an open source developer and likes to keep up to date on new c++ developments. In his free time he enjoys playing video games and watching science fiction together with his wife Babette.

The main() Course—Adi Shavit

A fanciful little post about li’l old main().

The main() Course

by Adi Shavit

From the article:

The function main() is a normal program’s entry point.

The shortest conforming C++ executable program is: int main(){}