--
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/CAAHOzFBja0yvfRQTPDo%2Bhuvd7uHr%3DDFZ5SDcmWfV9_h0zevngw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAJ_4DfRGfqeLOPoU4KziZ5iZ8pr%2Beu%3DgLgX5FPALE_Hv%3DjwzJQ%40mail.gmail.com.
I'm very supportive of removing this and using C++ native features instead. How hard would it be to actually remove this from the codebase?
I'm not in love with deprecations unless we're actively removing existing users. Otherwise we end up with situations where refactoring results in violations of the deprecation policy.
A blind replace of DISALLOW_COPY_AND_ASSIGN() with the =delete methods is unlikely to be completely sufficient. This is typically the last thing in a class and thus likely to be private.
There might be some fancy clang tooling way to do it. But it would need to be smart. We can't just blindly make them public, either. When the information was lost by making DISALLOW_COPY_AND_ASSIGN() private we lost the ability to easily recreate what it should have been.
The only nit-picky glasses-lift "well actually" thing is whether the error says "cannot call private function" or "method was deleted".
--
FWIW, I appreciated the macro when I first joined Chrome and started learning C++. I was not familiar with move-only types and the macro made very clear what was happening.
Do we know if new team members look at the C++ in Chromium Codelab or any other common C++ resource where we could add a short summary or pointer to more information about move-only types?
On Sun, Mar 10, 2019 at 3:41 PM Giovanni Ortuño <ort...@chromium.org> wrote:FWIW, I appreciated the macro when I first joined Chrome and started learning C++. I was not familiar with move-only types and the macro made very clear what was happening.I'm a bit confused. DISALLOW_COPY_AND_ASSIGN isn't really related to move-only types (indeed, it predates them). It's shorthand for making a type non-copyable, but by default that also makes the type non-movable as well. Declaring a move-only type requires explicitly declaring the move constructors in addition to deleting the copy ones.
Do we know if new team members look at the C++ in Chromium Codelab or any other common C++ resource where we could add a short summary or pointer to more information about move-only types?The Google style guide speaks at some length about move-only types and shows how to declare them. If people aren't reading the Google style guide I'm a bit worried about whether any other place will be as effective :).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/CAMDKGBW1gL4XAQ0ERtMpj9Ko05rEK%3D1%3DfbER1pmqaw7BfJ7UPg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CA%2BV2g111QZZOTA_EW1i4ZXgyGt42aDeMjy3SezrQN-KZFs4vjw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAJauWCFUQAi9WPD4uORxLHkL_s%3DRqDULLN2LuuU9xP9sETJYPA%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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CALB5StbfeH87-5hXaTBavSp8vkkeM8uONTGeNdUy7V6drQ6-CQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACuR13cvegcLYoKAeTdWpnGiNp%2B9dqAmympwWMLWYxZwr7f8Lg%40mail.gmail.com.
--
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/CAAHOzFDEgdS_FaKsNVsUjRycJ2r6B1DdG88Uua0KmOrV%2Bv5ENQ%40mail.gmail.com.
A couple people (including me) would like to do a full conversion instead of leaving us in an inconsistent state. vmpstr@ just sent me a CL to convert all of cc/, so I'm hoping there's an automated way to do everything (including moving to the public section). If so, I think the plan should be "add notes to guides as necessary, announce to chromium-dev, convert the whole codebase, remove the existing macros".