News

[C++17] Structured Bindings - Convert struct to a tuple (simple reflection)

An interesting piece of code!

[C++17] Structured Bindings - Convert struct to a tuple (simple reflection)

From the article:

Very simple approach to convert any struct (up to N members) to a tuple using C++17 structured bindings and the idea from Boost.DI (http://boost-experimental.github.io/di/cppnow-2016/#/7/11) used to detect type constructor traits.

CppCon 2015 `for_each_argument` explained and expanded—Vittorio Romeo

Have you registered for CppCon 2016 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 2015 for you to enjoy. Here is today’s feature:

`for_each_argument` explained and expanded

by Vittorio Romeo

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

During January 2015, Sean Parent posted a very interesting short piece of code on Twitter. The code iteratively iterates at compile-time over any number of function arguments, forwarding them one by one to a callable object.

How does this code work? What are the possible use cases? Can we make it even more generic and useful?

My talk answers all of the questions above, using independently compiled chronologically sequential code segments that show the audience the analysis and improvement process of `for_each_argument`.

Range-v3 on MSVC—Eric Mittelette

The Visual C++ Team is delighted to announce that they just published a range-v3 implementation.

Range-v3 on MSVC is Available on GitHub

by Eric Mittelette

From the article:

This contribution comes hot on the heels of our recent work to improve expression SFINAE on our Visual Studio 2015 Update 3 VC++ compiler . This is the first implementation of the Range TS running in MSVC. In “Ranges for the Standard Library, Revision 1” (N4128) Ranges are defined like this: “A range is an object that refers to a sequence of elements, conceptually similar to a pair of iterators. One prime motivation for ranges is to give users a simpler syntax for calling algorithms.

The Lightweight Visual Studio “15” Installer—Adam Welch

The Visual Studio Team has introduced five workloads for different C++ development scenarios, whether you are targeting Windows Desktop, Windows Store, or a non-Microsoft platform like Android or Linux:

The Lightweight Visual Studio “15” Installer

From the article:

Visual Studio now uses a small standalone application called the Microsoft Visual Studio Installer that manages all installations of Visual Studio 15...

CppCon 2015 Racing The File System—Niall Douglas

Have you registered for CppCon 2016 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 2015 for you to enjoy. Here is today’s feature:

Racing The File System

by Niall Douglas

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Almost every programmer knows about and fears race conditions on memory where one strand of execution may concurrently update data in use by another strand of execution, leading to an inconsistent and usually dangerous inconsistent read of program state. Almost every programmer therefore is aware of mutexes, memory ordering, semaphores and the other techniques used to serialise access to memory.

Interestingly, most programmers are but vaguely aware of potential race conditions on the filing system, and as a result write code which assumes that the filing system does not suddenly change out from underneath you when you are working on it. This assumption of a static filing system introduces many potential security bugs never mind ways of crashing your program, and of course creating data loss and corruption.

This workshop will cover some of the ways in which filing system races can confound, and what portable idioms and patterns you should employ to prevent misoperation, even across networked Samba shares. Finally, an introduction of the proposed Boost library AFIO will be made which can help application developers writing filing system race free code portably.

CppChat 2015-08-21: Jason Turner and Matt Bentley

Video chat:

CppChat 08-21 with Jason and Matt

with Jason Turner, Matt Bentley, and Jon Kalb

From the chat:

We discuss CppCon sessions including Matt's session on the game-friendly containers that he has created and Jason's plenary talk about writing a game for Commodore 64 in C++17, the reprisal of his award-winning C++Now talk on "Practical Performance Practices," and his talk with Rob Irving on their CppCast experiences. Along the way we discuss the history of the 6502 and Stepanov's observation that the STL was not designed with today's hardware in mind.