Revisit CPP, what is the relationship between list initialization and direct initialization?

Is

list initialization direct initialization? Or there is no relationship between the two

CPP
Jun.09,2021

syntax is two different things. After all, parentheses are different from curly braces. But list initialization is sometimes equivalent to direct initialization (non-aggregate type) and sometimes to direct assignment of members (aggregate type).

Menu