C++ User Group Meetings in February

New month, and a few more C++ User Group Meetings:

C++ User Group Meetings in February

by Jens Weller

From the article:

Again an overview on the upcoming meetings of C++ User Groups. This time, its February again, the shortest, and in a lot of places coldest month of the year. Still, 19 C++ User Groups have already...

The Meetings:

4.2 C++ UG Saint Louis - DD Part 2 - Lambdas
7.2 C++ UG Italy - Pordenone
11.2 C++ UG Utah - Asynchronous Messaging with ØMQ
11.2 C++ UG San Francisco/ Bay area - CopperSpice
11.2 C++ UG Santa Barbara - Introduction to OpenGL with SDL
12.2 C++ UG Dresden - Clean code in asynchronous Programming
12.2 C++ UG Wroclaw - Databases & C++: SOCI, boost::python
16.2 C++ UG Denver - Denver Tech Center C++ Developers
16.2 C++ UG Austin - North Austin Monthly C/C++ Pub Social
17.2 C++ UG Berlin - First meeting at think-cell
18.2 C++ UG Bristol - Kevlin Henney: Making Steaks from Sacred Cows
18.2 C++ UG Düsseldorf - Treffen der C++ User Gruppe NRW
18.2 C++ UG Hamburg - Treffen der C++ User Gruppe Hamburg
19.2 C++ UG Ruhrgebiet - February C++ Meetup in the Ruhr area
21.2 C++ UG Pune, India - Introduction to Concurrency and Memory Models
24.2 C++ UG Warsaw - Overload resolution oraz Zakamarki C++
24.2 C++ UG Edinburgh - First Meeting
25.2 C++ UG San Francisco/ Bay area - Workshop and Discussion Group
26.2 C++ UG Munich - "Dreaming of Names" and "A short (and practical) introduction to

CppCon 2014 Paying for Lunch: C++ in the ManyCore Age

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Paying for Lunch: C++ in the ManyCore Age

moderated by Herb Sutter, with Pablo Halpern, Jared Hoberock, Artur Laksberg, Ade Miller, Gor Nishanov and Michael Wong.

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Concurrency is one of the major focuses of C++17 and one of the biggest challenges facing C++ programmers today. Hear what this panel of experts has to say about how to write concurrent C++ now and in the future.

Know your libraries -- Arne Mertz

Prefer standard library over handcrafted logic/algorithm.

Know your libraries

by Arne Mertz

From the article:

I often see people use handcrafted loops or write weird workarounds for stuff the standard library has already taken care of. This does not only apply for standard library features but also for any other library, like Boost, other third party libraries and the libraries the code belongs to. That is bad for several reasons, and I am going to lay out what I think every developer should be required to do before he writes production code.

Two fundamental implementations for one conceptual object -- Mark Isaacson

From the Modern Maintainable Code blog:

Two fundamental implementations for one conceptual object

by Mark Isaacson

From the article:

This is the third article of a series on code reuse. This article discusses how to select between implementations of an object based on patterns in type information. The article uses std::unique_ptr's deleter as a practical case study.

You can find the previous article of the series here (which discusses the analogous problem as it pertains to functions), and the prelude to the next article, which looks at the same problem with one caveat: designing it so that some, but not all, of the methods will be implemented the same way no matter what types you instantiate the object with, here.

Using Enum Classes as Bitfields -- Anthony Williams

How to use enum classes as as bitfields in modern C++ programs.

Using Enum Classes as Bitfields

by Anthony Williams

From the article:

C++11 introduced a new feature in the form of scoped enumerations, also referred to as enum classes, since they are introduced with the double keyword enum class (though enum struct is also permissible, to identical effect). To a large extent, these are like standard enumerated types: you can declare a list of enumerators, which you may assign explicit values to, or which you may let the compiler assign values to. You can then assign these values to variables of that type. However, they have additional properties which make them ideal for use as bitfields. I recently answered a question on the accu-general mailing list about such a use, so I thought it might be worth writing a blog post about it.

 

Effective Modern C++ eBook Sample Content -- Scott Meyers

Scott Meyers just published on his blog, that one can get a free sample chapter of his EMC++ book.

EMC++ Sample Content

by Scott Meyers

From the article

O'Reilly has decided it's time to turn up the heat on the grand Effective Modern C++ marketing campaign. A key component of that campaign is giving away excerpts of the book, the idea being that if you like the stuff we give away, you're more likely to plunk down some cash for the rest of the book.

CppCon 2014 C++ on Mars: Incorporating C++ into Mars Rover Flight Software--Mark Maimone

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

C++ on Mars: Incorporating C++ into Mars Rover Flight Software

by Mark Maimone

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

One of the more challenging aspects of developing flight software (FSW) for NASA's Spirit and Opportunity Mars Exploration Rovers (MER) and Curiosity, the Mars Science Laboratory rover was how to enable them to drive themselves safely through unknown Martian terrain. When the MER mission was approved in the year 2000, JPL researchers had already demonstrated that capability on prototype rovers [1] using software written primarily in C++ on a VxWorks realtime O/S platform with shared memory. So when asked to incorporate that capability into the MER vehicles which also relied on a similar VxWorks realtime O/S, the team concluded it would be safest and most expedient to incorporate the already field-tested C++ software. But that presented a challenge, since at that point all rover FSW development was mandated to be done mainly in the C programming language.

In this talk we present some of the challenges we faced and solutions we found in deploying C++ onto the Mars Rovers. For example, dynamic allocation was initially precluded, but development of a specialized memory allocator (using the C++ "placement new" operator) enabled us to incorporate it safely into the flight system. We will discuss what aspects of C++ were incorporated, what simulation environments aided development, describe some of the tools used to validate system behavior, and explain how our success using C++ for the implementation of autonomous navigation on MER has influenced future FSW efforts.

Yes, we must replace it++ with ++it--Andrey Karpov

I decided to find out if there is practical sense in writing ++iterator instead of iterator++ when handling iterators.

Is it reasonable to use the prefix increment operator ++it instead of postfix operator it++ for iterators?

by Andrey Karpov

From the article:

I will always write ++it. I did so before but I did it "just in case". Now I can see how useful it is because I regularly launch debug versions. In general, of course, ++it has a very slight influence on the running time. But if I don't make such small optimizations in different places of the code, it will be too late and the profiler won't help me. Bottlenecks will be spread throughout the code.

 

Funny bug #20150127--Marco Foco

Marco Foco spotted a subtle bug in a piece of code that used boost::program_options. Can you find it?

Funny bug #20150127

by Marco Foco

From the article:

Two days ago I’ve been asked to have a look at a nonworking piece of code, based on boost::program_options [...] This syntax is not only unusual, but also dangerous.