I am reading this Stack Overflow question, and I added a constructor to the code from that question as the follwing,
class Foo {
struct Bar {
The question you link explains a lot but as a supplement to what is being written there...
The main difference is that in the second line auto b=... you let the compiler deduce the type of the expression. You can't specify the type, as the name of the type is hidden. The type though is usable (at least from the compiler)
You expose the name of the type publicly so it can be used.
This is a very nice answer https://stackoverflow.com/a/13532882/3037915
To try to answer the question in the header, you may consider type as a shape and the name of the type as the name you use to refer to a particular shape. Even if the name of the "shape" is hidden, the shape still exists and can be used.