| ▲ | uecker 4 hours ago | |
Personally, I would like to have pattern matching, but I think we need some other features first. I am usually a bit scared about what C++ comes up with. I am not sure I understand the second question. I do not think compound literals have complex lifetime rules. The lifetime end with the corresponding block, as do other objects in C (one needs to know what a block is, some people confuse this with scope). There is some potential issue which may be surprising when passing them to macros that make use of the statement expression extension, as the lifetime is then limited to the macro body. | ||