You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACSHbcQOA4q%3D%2BUC7WctN_VROOcqdmFA%3DB%3Dwv1-E0tyswHWh6Kg%40mail.gmail.com.
The linked TotW also talks about preferring emplace() over insert() for std::set... would you say that applies to std::map as well? I personally think emplace() is nicer than insert+std::make_pair for associative containers.
operator[] syntax definitely looks the most intuitive but has the side effect of default constructing the value if the key doesn't already exist. I doubt that this can typically be optimized out, which would make it suboptimal from a code size perspective (compared to emplace or insert).
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAHOzFAmbf3a2YxGtGDSh7V3U100b-gisL%3Dnhzo4eVHz%3D0UMRw%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACwGi-7YUYKRcwU%3D5hq3C-JY748%2BQCmcNWwdmDVw58mqmdku-Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAF3XrKogbxL8_Qzo5sYdk5CiO3aPx4R_QFV7%3Dnyw4ptQKRjT5Q%40mail.gmail.com.
Hi,I saw a Tricium comment suggesting replacing push_back with emplace_back (for a std::vector) today. Doesn't the comment conflict with this recommendation?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CABihn6FBrxv7w3yQ6q7Pvc94jvPT88DhARGnTeAmxR%3DcsVbnZw%40mail.gmail.com.
Hi,I saw a Tricium comment suggesting replacing push_back with emplace_back (for a std::vector) today. Doesn't the comment conflict with this recommendation?
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAHOzFBnr8O%2BEZf12UuU2tvKgZj9jOHPv4pHXKThbVHcNu7XOQ%40mail.gmail.com.