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

Issue 2047013002: Add base::get to support rvalue-reference tuple (Closed)

Created:
4 years, 6 months ago by tzik
Modified:
4 years, 6 months ago
Reviewers:
danakj
CC:
chromium-reviews, Nico
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add base::get to support rvalue-reference tuple std::get in libstdc++4.6 doesn't have a overload for rvalue-reference tuple. That implies std::get<0>(std::make_tuple(1)) is `const int&`, instead of `int&&`. This CL add base::get with correct type. Committed: https://crrev.com/ec749b1eeaa49a45973e651e870ed16531c8b0d9 Cr-Commit-Position: refs/heads/master@{#401758}

Patch Set 1 #

Total comments: 4

Patch Set 2 : +style guide #

Patch Set 3 : +test case #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -1 line) Patch
M base/tuple.h View 1 chunk +14 lines, -0 lines 0 comments Download
M base/tuple_unittest.cc View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
M styleguide/c++/c++11.html View 1 1 chunk +2 lines, -1 line 3 comments Download

Messages

Total messages: 19 (6 generated)
tzik
PTAL
4 years, 6 months ago (2016-06-07 16:09:09 UTC) #3
tzik
Dana, could you review this?
4 years, 6 months ago (2016-06-10 06:28:22 UTC) #5
danakj
https://codereview.chromium.org/2047013002/diff/1/base/tuple.h File base/tuple.h (right): https://codereview.chromium.org/2047013002/diff/1/base/tuple.h#newcode113 base/tuple.h:113: return std::forward<ElemType>(std::get<I>(t)); Why forward instead of move? Trying to ...
4 years, 6 months ago (2016-06-14 18:54:07 UTC) #6
danakj
Oh, can you also add a note in styleguide/c++/ under tuple about this at the ...
4 years, 6 months ago (2016-06-14 18:54:52 UTC) #7
tzik
https://codereview.chromium.org/2047013002/diff/1/base/tuple.h File base/tuple.h (right): https://codereview.chromium.org/2047013002/diff/1/base/tuple.h#newcode113 base/tuple.h:113: return std::forward<ElemType>(std::get<I>(t)); On 2016/06/14 18:54:07, danakj wrote: > Why ...
4 years, 6 months ago (2016-06-14 22:34:52 UTC) #8
danakj
https://codereview.chromium.org/2047013002/diff/1/base/tuple.h File base/tuple.h (right): https://codereview.chromium.org/2047013002/diff/1/base/tuple.h#newcode113 base/tuple.h:113: return std::forward<ElemType>(std::get<I>(t)); On 2016/06/14 22:34:52, tzik wrote: > On ...
4 years, 6 months ago (2016-06-17 22:55:12 UTC) #9
tzik
https://codereview.chromium.org/2047013002/diff/1/base/tuple.h File base/tuple.h (right): https://codereview.chromium.org/2047013002/diff/1/base/tuple.h#newcode113 base/tuple.h:113: return std::forward<ElemType>(std::get<I>(t)); On 2016/06/17 22:55:12, danakj wrote: > On ...
4 years, 6 months ago (2016-06-21 08:46:33 UTC) #10
danakj
OK I get it, sorry I was stumbling over the many types in the function ...
4 years, 6 months ago (2016-06-22 22:37:50 UTC) #11
tzik
https://codereview.chromium.org/2047013002/diff/40001/styleguide/c++/c++11.html File styleguide/c++/c++11.html (left): https://codereview.chromium.org/2047013002/diff/40001/styleguide/c++/c++11.html#oldcode457 styleguide/c++/c++11.html:457: <td>Prefer <code>std::tuple</code> over <a href="https://crbug.com/554987"><code>base::Tuple</code></a>.</td> On 2016/06/22 22:37:49, danakj ...
4 years, 6 months ago (2016-06-23 04:37:30 UTC) #12
danakj
LGTM https://codereview.chromium.org/2047013002/diff/40001/styleguide/c++/c++11.html File styleguide/c++/c++11.html (left): https://codereview.chromium.org/2047013002/diff/40001/styleguide/c++/c++11.html#oldcode457 styleguide/c++/c++11.html:457: <td>Prefer <code>std::tuple</code> over <a href="https://crbug.com/554987"><code>base::Tuple</code></a>.</td> On 2016/06/23 04:37:29, ...
4 years, 6 months ago (2016-06-23 20:41:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047013002/40001
4 years, 6 months ago (2016-06-23 20:41:36 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-24 00:33:59 UTC) #17
commit-bot: I haz the power
4 years, 6 months ago (2016-06-24 00:35:49 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ec749b1eeaa49a45973e651e870ed16531c8b0d9
Cr-Commit-Position: refs/heads/master@{#401758}

Powered by Google App Engine
This is Rietveld 408576698