Opening Keynote Meeting C++ 2019 - Howard Hinnant
The first keynote of this years Meeting C++ conference is online:
Opening Keynote Meeting C++ 2019 - Howard Hinnant - Design Rationale for the chrono Library
by Howard Hinnant
February 10-15, Hagenberg, Austria
March 19-21, Madrid, Spain
April 1-4, Bristol, UK
June 16-21, Sofia, Bulgaria
By Meeting C++ | Dec 6, 2019 10:42 AM | Tags: performance meetingcpp intermediate howard hinnant experimental efficiency community chrono c++20 c++17 c++14 c++11 basics advanced
The first keynote of this years Meeting C++ conference is online:
Opening Keynote Meeting C++ 2019 - Howard Hinnant - Design Rationale for the chrono Library
by Howard Hinnant
By Meeting C++ | Dec 5, 2019 10:06 AM | Tags: meetingcpp intermediate community c++20 c++17 c++11 basics advanced
The lightning talks from Meeting C++ 2019 are now online!
Meeting C++ Youtube Channel
by Jens Weller
From the article:
A few lightning talks I'd like to point to:
Finding hard to find bugs with Address Sanitizer - Marshall Clow
Consistently Inconsistent - Conor Hoekstra
By Marco Arena | Nov 28, 2019 08:44 AM | Tags: intermediate c++20 c++17
An technical post with a moral:
Tale of an insight
by Marco Arena
From the article:
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order...
By Meeting C++ | Oct 22, 2019 04:58 AM | Tags: meetingcpp intermediate events conference community c++17 c++14 c++11 basics
Some details on the keynotes of this years Meeting C++ conference
Keynote details for Meeting C++ 2019
by Jens Weller
From the article:
With just a few weeks left to Meeting C++ 2019, its time for a closer look at the keynotes!
By Adrien Hamelin | Oct 15, 2019 12:00 PM | Tags: stl intermediate
Simple and sweet.
How to Merge Consecutive Elements in a C++ Collection
by Jonathan Boccara
From the article:
Merging identical consecutive elements in a collection is a recurring need, in C++ or elsewhere in programming.
For example, we could want to aggregate a collection of hourly results into a collection of daily results: all the results of each day get aggregated into one for that day. In this case, being “identical” means being on the same day, and “aggregating” means taking two results with a common date, and creating a result at this date and with the sum of their amounts...
By Adrien Hamelin | Sep 24, 2019 10:39 AM | Tags: intermediate c++11
What do you think?
How C++ ‘using’ or alias-declaration is better than typedef
by nextptr
From the article:
Alias-declaration or type-alias with 'using' statement offers a more flexible way to define type aliases than typedef, mainly because of alias templates...
By Adrien Hamelin | Sep 16, 2019 12:01 PM | Tags: intermediate c++17 c++14
Quick A: this is no longer an issue with C++17.
Recently on SO:
Undefined reference to static constexpr char[]
Add to your cpp file:
constexpr char foo::baz[];Reason: You have to provide the definition of the static member as well as the declaration. The declaration and the initializer go inside the class definition, but the member definition has to be separate.
By Adrien Hamelin | Aug 13, 2019 10:27 AM | Tags: intermediate
Quick A: When you might delete polymorphically.
Recently on SO:
When to use virtual destructors?
Virtual destructors are useful when you might potentially delete an instance of a derived class through a pointer to base class:
class Base { // some virtual methods }; class Derived : public Base { ~Derived() { // Do some important cleanup } };Here, you'll notice that I didn't declare Base's destructor to be virtual. Now, let's have a look at the following snippet:
Base *b = new Derived(); // use b delete b; // Here's the problem!Since Base's destructor is not virtual and b is a Base* pointing to a Derived object, delete b has undefined behaviour...
By Adrien Hamelin | Jul 23, 2019 11:50 AM | Tags: intermediate c++17
C++17 to the rescue.
What Every C++ Developer Should Know to (Correctly) Define Global Constants
by Jonathan Boccara
From the article:
Constant values are an everyday tool to make code more expressive, by putting names over values.
For example, instead of writing 10 you can write MaxNbDisplayedLines to clarify your intentions in code, with MaxNbDisplayedLines being a constant defined as being equal to 10.
Even though defining constants is such a basic tool to write clear code, their definition in C++ can be tricky and lead to surprising (and even, undefined) behaviour, in particular when making a constant accessible to several files.
Everything in this article also applies to global variables as well as global constants, but global variables are a bad practice contrary to global constants, and we should avoid using them in the first place...
By Adrien Hamelin | Jul 23, 2019 11:36 AM | Tags: stl intermediate
Continuing.
More Rules to the Regular Expression Library
by Rainer Grimm
From the article:
There is more to write to the usage of regular expressions than I wrote in my last post The Regular Expression Library. Let's continue...