I am an old school C++ developer and even today I have no professional C++11 experience. I trust the C++ committee that the language is moving in the right direction, but it seems that in the projects I work the scepticism is dominant and a lot of the C++11 features are banned even before they are understood and explored.
Anyways, I am having a chance now to work on a new code base and I would like to apply all C++11 power, but I do not want to shoot myself in the foot.
In the past, I found some of the static code analysis tools to be extremely powerful teaching instrument to show me all these subtle aspects of the language.
For my project, I use clang, and portable libraries as STL and Boost that build on Windows, Linux, Mac and more.
I hoped clang-tidy, clang-modernize, etc. will be good tools to let me tune my behavior to the C++11 feature, but they seem to provide very limited help - it literally took me like 2-3 days to adapt to all the suggestions they do... and I am sure that there are a lot of possibilities that I am missing based on rvalue references for example.
Some features that I would like it to have:
When copy elision is not sufficient and forwarding interface will provide optimization.
When some of the class members are not movable and auto-generated move constructor and move assignment operator is not possible.
When local variable could be moved if this is the last reference in its scope.
When
const auto&
is better overauto
.
I have no price limits.