CppCon 2015 string_view--Marshall Clow

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:

string_view

by Marshall Clow

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

The library fundamentals TS contains a new class "string_view", which appears to be unlike anything else in the standard library. In this talk, we will explore the uses of string_view, when it is appropriate to use it, and when it is not. Along the way, I will discuss other possible "_view" classes, with an eye to the upcoming "ranges" proposal before the standards committee.

CppCon Call for Lightning Talks

Do you have something to say to C++ programers? Can you say it in five minutes?

CppCon 2016 Call for Lightning Talks

by Michael Caisse

From the call:

Lightning talks are fast paced, short presentations often sprinkled with humor and intrigue. The popular 5-minute talks present topics that are interesting to C++ programmers and are open to speakers at all experience levels.

CppCast Episode 69: MAME Emulation Project with Miodrag Milanovic

Episode 69 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Miodrag Milanovic to discuss his work on the MAME emulation project, its history and moving the MAME codebase from C to C++.

CppCast Episode 69: MAME Emulation Project with Miodrag Milanovic

by Rob Irving and Jason Turner

About the interviewee:

Born in 1978, living in Novi Sad, Serbia. Proud husband and father of two. Started professional programming career in year 2000 working in Java, C# and of course C and C++ for various international customers. From 2012 coordinator of MAME emulation project, pushing hard in modernization of two decade old code.

CppCon Regular Registration Ends Sunday

The window is closing on regular registration for CppCon 2016

CppCon 2016 Registration

by Jon kalb

From the website:

The Regular registration fee is $995. Regular registration ends September 11th, after which the late registration fee of $1195 applies.

awesome-cmake released! -- Viktor Kirilov

Even cmake is not about C++, it is the most popular platform independend make tool used for C++.

awesome-cmake Released!

by Viktor Kirilov

From the collection:

This curated list contains awesome CMake scripts, modules, examples, and others.

CppCon 2016 Call for Open Content

Do you have something to say to C++ programers?

CppCon 2016 Call for Open Content

by Michael Caisse

From the call:

Open Content is just that, open! Attendees and regular program speakers alike can propose sessions on anything that interests them.

 

Quick Q: Marking std::unique_ptr class member as const

Quick A: It prevents you of being able to move your class.

Recently on SO:

Marking std::unique_ptr class member as const

Because of the nature of a std::unique_ptr (sole ownership of an object) it's required to have no copy constructor whatsoever. The move constructor(6) only takes non-const rvalue-references which means that if you'd try to make your _child const and move it you'd get a nice compilation error smile

Even if a custom unique_ptr would take a const rvalue-reference it would be impossible to implement.

Quick Q: Is the std::array bit compatible with the old C array?

Quick A: Yes, you can copy bitwisely from one to the other.

Recently on SO:

Is the std::array bit compatible with the old C array?

The requirement on the data() method is that it return a pointer T* such that:

[data(), data() + size()) is a valid range, and data() == addressof(front()).

This implies that you can access each element sequentially via the data() pointer, and so if T is trivially copyable you can indeed use memcpy to copy sizeof(T) * size() bytes to/from an array T[size()], since this is equivalent to memcpying each element individually.

However, you cannot use reinterpret_cast, since that would violate strict aliasing, as data() is not required to actually be backed by an array - and also, even if you were to guarantee that std::array contains an array, since C++17 you cannot (even using reinterpret_cast) cast a pointer to an array to/from a pointer to its first member (you have to use std::launder).

CppCon 2015 Pruning Error Messages From Your C++ Template Code--Roland Bock

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:

Pruning Error Messages From Your C++ Template Code

by Roland Bock

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Many template libraries are regarded with ambivalent feelings by developers: On the one hand, such libraries can offer wonderful functionality. On the other hand, they are dreaded for the sheer amount of error messages spilled out by the compiler when there is even a small bug in the developer's code. This talk will demonstrate several techniques to drastically reduce the amount of compiler output in case of errors (with real-life examples, of course).