New issue
Advanced search Search tips

Issue 593407 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Remove functions that were deprecated in C++11

Project Member Reported by vmp...@chromium.org, Mar 9 2016

Issue description

Some functions like

std::binary_function and std::unary_function were deprecated in C++11 and are slated to be removed in C++17. 

Also, they currently only provide two typedefs that are typically unused. If they are needed, the recommendation is to add the typedefs manually. 

All in all, this bug tracks cleaning up unnecessary code. 

 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3abe3303bcbb2b24d7c21228f88114337347b674

commit 3abe3303bcbb2b24d7c21228f88114337347b674
Author: vmpstr <vmpstr@chromium.org>
Date: Wed Mar 09 19:38:19 2016

Remove uses of std::unary_function and std::binary_function.

This patch removes unary and binary function, since those are deprecated
in C++11. They also only provide two typedefs, so this cleans up some
code. In rare cases where the typedefs are actually required, it's
easier to just provide the typedef directly instead of deriving from
one of these functions.

BUG=593407

Review URL: https://codereview.chromium.org/1420333006

Cr-Commit-Position: refs/heads/master@{#380179}

[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/ash/wm/overview/window_grid.cc
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/ash/wm/overview/window_selector.cc
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/components/bookmarks/browser/bookmark_index.cc
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/components/bookmarks/browser/bookmark_model.cc
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/components/omnibox/browser/history_quick_provider_unittest.cc
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/components/omnibox/browser/url_index_private_data.h
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/components/variations/entropy_provider.h
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/content/browser/appcache/appcache_storage_impl.cc
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/net/cookies/cookie_monster.cc
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/tools/gn/label_ptr.h
[modify] https://crrev.com/3abe3303bcbb2b24d7c21228f88114337347b674/ui/base/l10n/l10n_util_collator.h

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad1b44e489281f42a0ea6d7d9516ba30d5879225

commit ad1b44e489281f42a0ea6d7d9516ba30d5879225
Author: vmpstr <vmpstr@chromium.org>
Date: Fri Mar 11 21:39:53 2016

Remove std::mem_fun uses.

This patch removes std::mem_fun and std::mem_fun_ref uses from the
codebase, since those are deprecated in C++11. Additionally, the
resulting code should be simpler to parse, since most of the time the
use is replaced with a ranged based for-loop, which is a more familiar
construct.

Discussion:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/ip8T6u-o7KY

TBR=gavinp
BUG=593407

Review URL: https://codereview.chromium.org/1782963002

Cr-Commit-Position: refs/heads/master@{#380740}

[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/chrome/browser/browsing_data/cookies_tree_model.cc
[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/chrome/browser/prerender/prerender_manager.cc
[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/chrome/browser/search_engines/search_provider_install_data.cc
[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/content/browser/appcache/appcache_service_impl.cc
[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/content/browser/appcache/appcache_storage_impl.cc
[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/net/disk_cache/simple/simple_backend_impl.cc
[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/storage/browser/quota/quota_manager.cc
[modify] https://crrev.com/ad1b44e489281f42a0ea6d7d9516ba30d5879225/storage/browser/quota/quota_task.cc

Sign in to add a comment