I am reading Bjarne Stroustrup "The C++ programming language" book, and it is mentioned that one of the reasons for using auto in a variable definition is:
The definition is in a large scope where we want to make the type clearly visible to readers of our code.
What is the meaning of large scope here? and anyone has an example for this statement, as I feel it is not clear how using auto is making the type clearly visible to readers of the code.
auto
. Sentence prior: "We use auto where we don’t have a specific reason to mention the type explicitly. ‘‘Specific reasons’’ include:". "specific reasons" refers to reasons to mention the type explicit and therefore not useauto
.user17732522
, the author is giving some "specific reasons" to useauto
.