13 Aug
2016
13 Aug
'16
2:27 p.m.
Hi all,
Now that we can use C++11 in trunk (yeah!), what are the best practices? Are there parts of C++11 we still want to avoid?
I started to think about this as I noticed in the code some places with perhaps over aggressive use of 'auto'. It seems to me that 'auto' should be reserved to places where it replaces a long, already unreadable iterator type. But it should not be used to replace simple types as this reduces the readability of the code, especially to someone not familiar with the code. For example, I don't see any benefit of replacing:
GtkWidget* mywidget = someFunction();
by
auto* mywidget = someFunction()
Tav