You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Michael Park <mp...@apache.org> on 2017/01/11 01:28:45 UTC

Review Request 55400: Fix compilation error for clang-3.5 type deduction error.

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

Review request for mesos and Joseph Wu.


Repository: mesos


Description
-------

`clang-3.5` performs incorrect type deduction for lambda return types.
Namely,

```cpp
struct S {};
auto l = [](const S& s) { return s; }
```

The deduced return type of lambda `l` is `const S` as opposed to `S`.


Diffs
-----

  src/slave/containerizer/mesos/io/switchboard.cpp c444568dd478902afd79fe3c8960364fd68fabb5 

Diff: https://reviews.apache.org/r/55400/diff/


Testing
-------


Thanks,

Michael Park


Re: Review Request 55400: Fix compilation error for clang-3.5 type deduction error.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55400/#review161173
-----------------------------------------------------------



Patch looks great!

Reviews applied: [55400]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On Jan. 11, 2017, 1:28 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55400/
> -----------------------------------------------------------
> 
> (Updated Jan. 11, 2017, 1:28 a.m.)
> 
> 
> Review request for mesos and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `clang-3.5` performs incorrect type deduction for lambda return types.
> Namely,
> 
> ```cpp
> struct S {};
> auto l = [](const S& s) { return s; }
> ```
> 
> The deduced return type of lambda `l` is `const S` as opposed to `S`.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/io/switchboard.cpp c444568dd478902afd79fe3c8960364fd68fabb5 
> 
> Diff: https://reviews.apache.org/r/55400/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 55400: Fix compilation error for clang-3.5 type deduction error.

Posted by Michael Park <mp...@apache.org>.

> On Jan. 10, 2017, 5:40 p.m., Joseph Wu wrote:
> > src/slave/containerizer/mesos/io/switchboard.cpp, line 1598
> > <https://reviews.apache.org/r/55400/diff/1/?file=1602135#file1602135line1598>
> >
> >     Technically, we expect the return type to be `Future<http::Response>`, to match the return type of the function.

Well, the intention is that we simply fill in the correct type that a correct compiler would deduce here.


- Michael


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


On Jan. 10, 2017, 5:28 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55400/
> -----------------------------------------------------------
> 
> (Updated Jan. 10, 2017, 5:28 p.m.)
> 
> 
> Review request for mesos and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `clang-3.5` performs incorrect type deduction for lambda return types.
> Namely,
> 
> ```cpp
> struct S {};
> auto l = [](const S& s) { return s; }
> ```
> 
> The deduced return type of lambda `l` is `const S` as opposed to `S`.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/io/switchboard.cpp c444568dd478902afd79fe3c8960364fd68fabb5 
> 
> Diff: https://reviews.apache.org/r/55400/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 55400: Fix compilation error for clang-3.5 type deduction error.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55400/#review161169
-----------------------------------------------------------


Fix it, then Ship it!





src/slave/containerizer/mesos/io/switchboard.cpp (line 1598)
<https://reviews.apache.org/r/55400/#comment232405>

    Technically, we expect the return type to be `Future<http::Response>`, to match the return type of the function.


- Joseph Wu


On Jan. 10, 2017, 5:28 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55400/
> -----------------------------------------------------------
> 
> (Updated Jan. 10, 2017, 5:28 p.m.)
> 
> 
> Review request for mesos and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `clang-3.5` performs incorrect type deduction for lambda return types.
> Namely,
> 
> ```cpp
> struct S {};
> auto l = [](const S& s) { return s; }
> ```
> 
> The deduced return type of lambda `l` is `const S` as opposed to `S`.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/io/switchboard.cpp c444568dd478902afd79fe3c8960364fd68fabb5 
> 
> Diff: https://reviews.apache.org/r/55400/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>