3 ms·
Can someone explain how this "universal" syntax is supposed to be better than the old syntax?
by wfunction 10y ago
Can someone explain how this "universal" syntax is supposed to be better than the old syntax?
- gpderetta 10y agoT() had different meaninga depending on T and the context. It could be value initialisation, a cast, a function declaration(!). Also, when used with arguments, you couldn't use it to uniformly initialize aggregates and non aggregates, which is important in generic code. The T{} syntax can be either a constructor call or aggregate initialization and never a cast or function definition.