In C++11, This syntax was generalized, and any object type can now be
created with a braced initializer list, known as a braced-init-list in the C++
grammar.
Compilers’ determination to match braced initializers with constructors
taking std::initializer_lists is so strong, it prevails even if the best-match
std::initializer_list constructor can’t be called.
base on previous vector example, choosing between parentheses and braces
for object creation inside templates can be challenging.(it has different
semantic meaning.)
If you use a braced initialize list when initializing a variable, use an equals
before the open curly brace.
An empty pair of braces indicates default initialization. Default initialization
of POD types usually means initialization to binary zeros, whereas for
non-POD types default initialization means default constructor is invoked.
You can omit = under such context.
When you use Type{} to define a nameless temporary variable.don’t give variable name.
In C++, anonymous variables are primarily used either to pass or
return values without having to create lots of temporary variables
to do so.
anonymous objects are treated as rvalues (not lvalues, which have
an address). This means anonymous objects can only be passed or
returned by value or const reference. Otherwise, a named variable
must be used instead.