std::ref and std::cref are convenience functions that create std::reference_wrappers of type T or const T, respectively. While their usage should be rare, allowing them would make it possible to get rid of base::ConstRef [5] and base::internal::ConstRefWrapper [6], which are effectively our handrolled implementations of std::cref and std::reference_wrapper<const T>.
--PK
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFAE_u8nm3S4RThRzTZWUh0vn7biyd0EOsduCsT%3DAs2VNQ%40mail.gmail.com.
On Fri, Feb 22, 2019 at 6:04 AM 'Peter Kasting' via cxx <c...@chromium.org> wrote:On Fri, Feb 22, 2019 at 2:57 AM <jdoe...@chromium.org> wrote:std::ref and std::cref are convenience functions that create std::reference_wrappers of type T or const T, respectively. While their usage should be rare, allowing them would make it possible to get rid of base::ConstRef [5] and base::internal::ConstRefWrapper [6], which are effectively our handrolled implementations of std::cref and std::reference_wrapper<const T>.I'm supportive of any proposal that replaces a Chromium-specific object with a standardized one of equivalent functionality.I don't think we need to qualify in the features table as "usage should be rare"; while that's true in practice as you note, I think of that note as implying "this probably isn't what you want and you should think twice about using it", and I doubt we need to discourage usage of this (since few people will try anyway).
+1 to everything pkasting said :)PK--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To post to this group, send email to c...@chromium.org.To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFAE_u8nm3S4RThRzTZWUh0vn7biyd0EOsduCsT%3DAs2VNQ%40mail.gmail.com.
Jan Wilken Dörrie
Software Engineer
jdoe...@google.com
+49 89 839300973
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.