A list of modern C++ features
github.com
A list of modern C++ features
1–10 of 68 posts
Re: A list of modern C++ features
#2Re: A list of modern C++ features
#3[1] https://github.com/isocpp/CppCoreGuidelines
[2] https://reviews.llvm.org/diffusion/L/browse/clang-tools-extr...
Re: A list of modern C++ features
#4Nice summary! As someone who writes multi-platform C++, it would would be even greater (but a lot more work) if each feature listed which version of each major compiler introduced support. (ie. Can I use this feature if my codebase is currently compiling under given versions of Clang, GCC, VS.)
Re: A list of modern C++ features
#5As someone who doesn't work in C++ or have the benefit of 10 years experience to see the flaws, trying to write modern, safe C++ is essentially impossible. I spent a solid week trying to write something safe and only use C++14/17 features when they were available, and encountered a mountain of outdated- and mis-information about what one can and can't do, what is and isn't considered safe and why one certain feature is better than another.
It's nobody's fault that this happens, but with C++14 apparently fast becoming a language that is addressing it's #1 pitfall (safety) in an apparently very adequate way, it's frustrating that there's no "safe code" linter to stop rookies stepping on landmines.
Thanks for the list, it's a solid start, and the sibling comment about C++ Core Guidelines is another solid resource.
Re: A list of modern C++ features
#6Nice summary! As someone who writes multi-platform C++, it would would be even greater (but a lot more work) if each feature listed which version of each major compiler introduced support. (ie. Can I use this feature if my codebase is currently compiling under given versions of Clang, GCC, VS.)
Less details about library but otherwise good compiler compatibility table can be found on cppreference http://en.cppreference.com/w/cpp/compiler_support .
I've been in the situation many times where the compiler knows about a feature but the auto complete doesn't and the static analyzer will totally fail early and not report anything else except syntax error.
Re: A list of modern C++ features
#7"I remember from a symposium on higher level programming language a lecture given in defense of PL/1 by a man who described himself as one of its devoted users. But within a one-hour lecture in praise of PL/1. he managed to ask for the addition of about fifty new “features”, little supposing that the main source of his problems could very well be that it contained already far too many “features”. The speaker displayed all the depressing symptoms of addiction, reduced as he was to the state of mental stagnation in which he could only ask for more, more, more..."
https://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340...
Re: A list of modern C++ features
#8I really wish there would be a linter (I realise it's probably a nearly impossible task) which would complain when you use legacy, unsafe language features. As someone who doesn't work in C++ or have the benefit of 10 years experience to see the flaws, trying to write modern, safe C++ is essentially impossible. I spent a solid week trying to write something safe and only use C++14/17 features when they were available…
Re: A list of modern C++ features
#9I really wish there would be a linter (I realise it's probably a nearly impossible task) which would complain when you use legacy, unsafe language features. As someone who doesn't work in C++ or have the benefit of 10 years experience to see the flaws, trying to write modern, safe C++ is essentially impossible. I spent a solid week trying to write something safe and only use C++14/17 features when they were available…
Re: A list of modern C++ features
#10I really wish there would be a linter (I realise it's probably a nearly impossible task) which would complain when you use legacy, unsafe language features. As someone who doesn't work in C++ or have the benefit of 10 years experience to see the flaws, trying to write modern, safe C++ is essentially impossible. I spent a solid week trying to write something safe and only use C++14/17 features when they were available…
clang-tidy does this (or is working towards doing this) http://clang.llvm.org/extra/clang-tidy/checks/list.html
http://clang.llvm.org/extra/clang-tidy/ is much more approachable, and gives a solid overview.
The introductory sentence gave me project-naming cancer:
> clang-tidy is a clang-based C++ “linter” tool.
Then why is it called tidy ??? It appears first on page three of google's search results for "C++ linter" in spite of the fact that anything from LLVM is probably a) current and b) of exceptional quality.
A little marketing-mindset would go a long, long way for these kinds of things.
Whilst the Ruby community lead by the example of DHH often takes this concept too far, it is inarguably effective.