Get the latest tech news
How well do you know C++ auto type deduction?
One of the most iconic C++ features is the language’s ability to deduce types with the auto keyword. In this post, I’ll give a series of code snippits. Your job is to assess what will be deduced for v in each case. Determine for each: The deduced type If it is a value, an lvalue or rvalue reference, or a pointer Which CV qualifiers are applicable Some of these may not even compile, so “this won’t work” is a totally valid answer.
None
Or read this on Hacker News