Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Issue 693693005: tuple: update to make use of C++11 (Closed)

Created:
6 years, 1 month ago by mdempsky
Modified:
6 years ago
Reviewers:
Nico, dcheng
CC:
chromium-reviews, erikwright+watch_chromium.org, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

tuple: update to make use of C++11 This CL adds a generic variadic Tuple class that generalizes Tuple1, Tuple2, etc. It also adds the C++11-style get<N>(tuple) method for accessing tuple members. As a demonstration, the DispatchToFunction() and DispatchToMethod() functions have been updated to make use of these and became substantially shorter. However, to remain compatible with existing code that accesses Tuple fields by name, the Tuple class is actually implemented via multiple specializations that match the TupleN classes that used to exist. Once all access to foo.a, bar->b, ... have been updated to get<0>(foo), get<1>(*bar), ... then we can simplify Tuple further and eventually replace it with std::tuple. Committed: https://crrev.com/6e7f615f49056439312aad3fcdd2284e2bd69647 Cr-Commit-Position: refs/heads/master@{#307629}

Patch Set 1 #

Patch Set 2 : Restore still needed Dispatch methods #

Patch Set 3 : Another attempt at fixing android #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -1036 lines) Patch
M base/tuple.h View 1 2 13 chunks +300 lines, -1036 lines 1 comment Download

Messages

Total messages: 25 (3 generated)
mdempsky
dcheng: PTAL and let me know what you think of this CL. If you like ...
6 years, 1 month ago (2014-11-07 10:16:20 UTC) #2
dcheng
I'm generally supportive of CLs that bring us closer to C++11 standard classes. Does this ...
6 years, 1 month ago (2014-11-07 18:59:35 UTC) #3
mdempsky
On 2014/11/07 18:59:35, dcheng wrote: > I'm generally supportive of CLs that bring us closer ...
6 years, 1 month ago (2014-11-07 21:39:55 UTC) #4
Nico
The variadic template stuff is cool. I don't think making tuple similar to standard library ...
6 years, 1 month ago (2014-11-07 23:26:07 UTC) #6
mdempsky
On 2014/11/07 23:26:07, Nico wrote: > I don't think making tuple similar to standard library ...
6 years, 1 month ago (2014-11-08 13:38:21 UTC) #7
Nico
On Sat, Nov 8, 2014 at 5:38 AM, <mdempsky@chromium.org> wrote: > On 2014/11/07 23:26:07, Nico ...
6 years, 1 month ago (2014-11-08 23:14:39 UTC) #8
mdempsky
On 2014/11/08 23:14:39, Nico wrote: > Out of curiosity: What for? Primarily to write multidimensional ...
6 years, 1 month ago (2014-11-09 01:03:32 UTC) #9
Nico
On Sat, Nov 8, 2014 at 5:03 PM, <mdempsky@chromium.org> wrote: > On 2014/11/08 23:14:39, Nico ...
6 years, 1 month ago (2014-11-09 23:57:18 UTC) #10
mdempsky
On 2014/11/09 23:57:18, Nico wrote: > Is the tuple really not something that has some ...
6 years, 1 month ago (2014-11-10 01:02:47 UTC) #11
Nico
On 2014/11/10 01:02:47, mdempsky (Tokyo until Nov 14) wrote: > On 2014/11/09 23:57:18, Nico wrote: ...
6 years, 1 month ago (2014-11-10 02:33:00 UTC) #12
mdempsky
On 2014/11/10 02:33:00, Nico wrote: > But in return, this CL adds 130 lines of ...
6 years, 1 month ago (2014-11-10 02:54:42 UTC) #13
tzik
My in-flight CL needs index access to a tuple [1]. It had its own tuple ...
6 years ago (2014-12-09 12:29:45 UTC) #14
mdempsky
On 2014/12/09 12:29:45, tzik wrote: > Is it possible to resurrect this CL? Ask Nico.
6 years ago (2014-12-09 22:51:03 UTC) #15
Nico
I think Bind() needing this is a good motivation for this change, so lgtm. (From ...
6 years ago (2014-12-09 23:03:50 UTC) #16
mdempsky
On 2014/12/09 23:03:50, Nico wrote: > I think Bind() needing this is a good motivation ...
6 years ago (2014-12-09 23:16:00 UTC) #17
Nico
Do you want to do something with it? I'd probably leave it here for now ...
6 years ago (2014-12-09 23:27:14 UTC) #18
mdempsky
On 2014/12/09 23:27:14, Nico wrote: > Do you want to do something with it? I'd ...
6 years ago (2014-12-09 23:36:14 UTC) #19
Nico
On 2014/12/09 23:36:14, mdempsky wrote: > On 2014/12/09 23:27:14, Nico wrote: > > Do you ...
6 years ago (2014-12-10 00:06:14 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/693693005/40001
6 years ago (2014-12-10 01:07:47 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years ago (2014-12-10 03:11:09 UTC) #23
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/6e7f615f49056439312aad3fcdd2284e2bd69647 Cr-Commit-Position: refs/heads/master@{#307629}
6 years ago (2014-12-10 03:11:54 UTC) #24
brucedawson
6 years ago (2014-12-15 23:22:34 UTC) #25
Message was sent while issue was closed.
https://codereview.chromium.org/803183004/ for discussion of the problems that
this change causes for /analyze :-(

Powered by Google App Engine
This is Rietveld 408576698