3 ms·
Can you share exactly why? If it is because auto as returning type, the header wouldn't be of much of a help would it? I find it easier to read now, specially
by pmelendez 11y ago
Can you share exactly why? If it is because auto as returning type, the header wouldn't be of much of a help would it?
I find it easier to read now, specially when using iterators on for loops.
- dman 11y agoHeres an example -> auto now = boost::chrono::steady_clock::now().time_since_epoch(); auto timeSinceEpoch = boost::chrono::duration_cast<boost::chrono::milliseconds>(now).count(); (This is from http://stackoverflow.com/questions/16700277/get-a-double-from-boostchronosteady-clocknow http://stackoverflow.com/questions/16700277/get-a-double-fro...). The person writing the answer is dilligent and hence has supplied the types as a preamble. Most articles / answers / api docs dont take the effort to elaborate on return value types.