Wouter van Ooijen - Embedded & C++ - Meeting C++ 2017 Keynote
The video of the closing keynote from Meeting C++ 2017 is online:
Embedded & C++ - Meeting C++ 2017 Keynote
by Wouter van Ooijen
March 19-21, Madrid, Spain
April 1-4, Bristol, UK
June 16-21, Sofia, Bulgaria
By Meeting C++ | Dec 28, 2017 04:54 AM | Tags: meetingcpp embedded basics
The video of the closing keynote from Meeting C++ 2017 is online:
Embedded & C++ - Meeting C++ 2017 Keynote
by Wouter van Ooijen
By Meeting C++ | Dec 23, 2017 06:39 AM | Tags: meetingcpp keynote intermediate efficiency community basics
The first keynote from Meeting C++ 2017 has been published:
Kate Gregory - It's Complicated - Meeting C++ 2017 Center Keynote
by Kate Gregory
By bfilipek | Dec 6, 2017 10:51 AM | Tags: basics
Examples where unique_ptr shines:
5 ways how unique_ptr enhances resource safety in your code
by Bartlomiej Filipek
From the article:
While shared_ptr and weak_ptr are more complex, unique_ptr seems to be a perfect replacement for owning raw pointers. Not to mention is the fact that this pointer type is mostly a compile time “wrapper” and it cost almost nothing in the runtime.
By Adrien Hamelin | Nov 9, 2017 02:46 PM | Tags: basics
Quick A: It tell the compiler not to do any implicit conversions of types.
Recnetly on SO:
What does the explicit keyword mean?
The compiler is allowed to make one implicit conversion to resolve the parameters to a function. What this means is that the compiler can use constructors callable with a single parameter to convert from one type to another in order to get the right type for a parameter.
Here's an example class with a constructor that can be used for implicit conversions:
class Foo { public: // single parameter constructor, can be used as an implicit conversion Foo (int foo) : m_foo (foo) { } int GetFoo () { return m_foo; } private: int m_foo; };Here's a simple function that takes a Foo object:
void DoBar (Foo foo) { int i = foo.GetFoo (); }and here's where the DoBar function is called.
int main () { DoBar (42); }The argument is not a Foo object, but an int. However, there exists a constructor for Foo that takes an int so this constructor can be used to convert the parameter to the correct type.
The compiler is allowed to do this once for each parameter.
Prefixing the explicit keyword to the constructor prevents the compiler from using that constructor for implicit conversions. Adding it to the above class will create a compiler error at the function call DoBar (42). It is now necessary to call for conversion explicitly with DoBar (Foo (42))
The reason you might want to do this is to avoid accidental construction that can hide bugs. Contrived example:
- You have a MyString(int size) class with a constructor that constructs a string of the given size. You have a function print(const MyString&), and you call print(3) (when you actually intended to call print("3")). You expect it to print "3", but it prints an empty string of length 3 instead.
By bfilipek | Oct 31, 2017 12:49 AM | Tags: basics
Let’s investigate what "not_null" (from the Core Guidelines/Guideline Support Library) can do for us.
How not_null can improve your code?
by Bartlomiej Filipek
From the article:
I believe "not_null" can help in many places. It won’t do the magic on its own, but at least it forces us to rethink the design. Functions might become smaller (as they won’t have to check for nulls), but on the other hand, the caller might require being updated.
By Meeting C++ | Oct 18, 2017 01:41 AM | Tags: meetingcpp intermediate conference community basics advanced
With the conference just a few weeks away, an update on the 3 awesome keynotes of this years Meeting C++:
Keynotes at Meeting C++ 2017
by Jens Weller
From the article:
Are you excited for Meeting C++ 2017?!? I quickly wanted to give an update on the 3 keynotes at the conference this year! Each day will feature one keynote, where the first two are in the morning, while the Closing Keynote is kind of the last thing to happen before the closing message. Also, all 3 keynote speakers have now (finally) their speaker profile.
By Meeting C++ | Oct 13, 2017 04:04 AM | Tags: qtdev qt python meetingcpp c++14 basics
New Just C++ episode, this time its about porting some python code to C++:
Just C++ - Penrose tiling from python to C++ & Qt
by Jens Weller
By Jason Turner | Oct 7, 2017 06:35 AM | Tags: basics
Episode 83 of C++ Weekly.
Installing Compiler Explorer
by Jason Turner
About the show:
This week is a demonstration of how to install and configure a local instance of Compiler Explorer.
By Adrien Hamelin | Oct 3, 2017 11:15 AM | Tags: community basics
A wonderful tale to read.
A Beginner's Guide to CPPCon 2017
by Eva "Bunny" Conti
From the article:
When we last left our heroine, she was just stating that although she'd be accompanying Ben to Seattle for his talk at CPPCon 2017, she wouldn't be attending the actual conference...
By Meeting C++ | Oct 3, 2017 04:05 AM | Tags: community c++14 c++11 beginner basics
The english translation of a talk I did at the C++ UG in Düsseldorf:
Beginning with C++
[german] Anfangen mit C++
by Jens Weller