mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Schlicht <...@mesosphere.io>
Subject Re: Review Request 69042: Enabled more constructors for master `RegistryOperation`.
Date Wed, 17 Oct 2018 08:53:33 GMT

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


Ship it!




Ship It!

- Jan Schlicht


On Oct. 16, 2018, 12:23 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69042/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2018, 12:23 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Chun-Hung Hsiao.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Since this class was explicitly declaring a constructor, no other
> constructors such as copy or move constructors were generated.
> 
> This patch removes the custom constructor so all default constructors
> are generated automatically. This e.g., enables move construction of
> `RegistryOperation` values.
> 
> 
> Diffs
> -----
> 
>   src/master/registrar.hpp 4f7c7ce2b3dea9f19eae67494f9767dc1c61e121 
> 
> 
> Diff: https://reviews.apache.org/r/69042/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> Without this patch a clang close to trunk would warn
> ```
> ../src/resource_provider/registrar.cpp:387:5: warning: explicitly defaulted move constructor
is implicitly deleted [-Wdefaulted-function-deleted]
>     AdaptedOperation(AdaptedOperation&&) = default;
>     ^
> ../src/resource_provider/registrar.cpp:374:28: note: move constructor of 'AdaptedOperation'
is implicitly deleted because base class 'master::RegistryOperation' has a deleted move constructor
>   class AdaptedOperation : public master::RegistryOperation
>                            ^
> ../src/master/registrar.hpp:45:27: note: copy constructor of 'RegistryOperation' is implicitly
deleted because base class 'process::Promise<bool>' has an inaccessible copy constructor
> class RegistryOperation : public process::Promise<bool>
>                           ^
> ../src/resource_provider/registrar.cpp:389:23: warning: explicitly defaulted move assignment
operator is implicitly deleted [-Wdefaulted-function-deleted]
>     AdaptedOperation& operator=(AdaptedOperation&&) = default;
>                       ^
> ../src/resource_provider/registrar.cpp:374:28: note: move assignment operator of 'AdaptedOperation'
is implicitly deleted because base class 'master::RegistryOperation' has a deleted move assignment
operator
>   class AdaptedOperation : public master::RegistryOperation
>                            ^
> ../src/master/registrar.hpp:45:27: note: copy assignment operator of 'RegistryOperation'
is implicitly deleted because base class 'process::Promise<bool>' has an inaccessible
copy assignment operator
> class RegistryOperation : public process::Promise<bool>
>                           ^
> 2 warnings generated.
> ```
> 
> No warning is emitted with this patch.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


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