mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 46823: Fully qualified addresses of Flag members in add calls in stout.
Date Tue, 05 Jul 2016 08:14:48 GMT


> On May 11, 2016, 11:18 p.m., Vinod Kone wrote:
> > 3rdparty/libprocess/src/tests/subprocess_tests.cpp, lines 519-526
> > <https://reviews.apache.org/r/46823/diff/1/?file=1365676#file1365676line519>
> >
> >     I was expecting the Flags::add() overload to only accept member variables. Why
do you need to change the call site instead?

When we have a `FlagsBase::add` taking e.g., a `T1 Flags::*t1` we do not take a pointer to
some specific value, but to a member. To call these we need to change call sites to actually
pass pointers to members like e.g., `&Flags::b` here. In this example `&b` is a pointer
to some specific value (which might reside inside some object), while we need to refer to
general the member field `Flags::b` to make `FlagsBase` safely copyable.


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46823/#review132748
-----------------------------------------------------------


On July 5, 2016, 1:14 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46823/
> -----------------------------------------------------------
> 
> (Updated July 5, 2016, 1:14 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Vinod Kone.
> 
> 
> Bugs: MESOS-3335
>     https://issues.apache.org/jira/browse/MESOS-3335
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> While right now we can technically `add` variables to `Flags` classes
> which are not members, the in order to have correct copy semantics for
> `Flags` only member variables should be used.
> 
> Here we changed all instances to a full pointer-to-member syntax in
> the current code.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/tests/subprocess_tests.cpp 3f3e21514bd5e2e388165eb64d540764097557ac

> 
> Diff: https://reviews.apache.org/r/46823/diff/
> 
> 
> Testing
> -------
> 
> Tested on various platforms in internal CI.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message