3 ms·
hahaha, I love this example By the way, I think that the behavior of the compiler is quite reasonable here. It could emit a warning, though.
by enriquto 6y ago
hahaha, I love this example
By the way, I think that the behavior of the compiler is quite reasonable here. It could emit a warning, though.
- account42 6y agoI don't think this should have a warning by default (or even in -Wall -Wextra). The code is not unreasonable - spamming warnings for such code will only get people to ignore warnings. It is something that a static analyzer should warn though since only having one implementation of Do indicates that there might be an opportunity to remove the abstraction in the code.
- enriquto 6y agoOf course it should not print a warning by default, but it would be nice if at least -Wextra said something.