You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jiang Yan Xu <ya...@jxu.me> on 2013/12/18 00:21:59 UTC
Review Request 16332: Added equality comparator for Option vs T.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/
-----------------------------------------------------------
Review request for mesos, Benjamin Hindman, Ben Mahler, Jie Yu, and Vinod Kone.
Repository: mesos-git
Description
-------
Used in a future patch to compare "UPID from" with "Option<UPID> master".
Diffs
-----
3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
Diff: https://reviews.apache.org/r/16332/diff/
Testing
-------
make check.
Thanks,
Jiang Yan Xu
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Jiang Yan Xu <ya...@jxu.me>.
> On Dec. 18, 2013, 1:13 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp, lines 88-89
> > <https://reviews.apache.org/r/16332/diff/3/?file=399067#file399067line88>
> >
> > Any need for the 1 suffix on these?
I guess not :)
- Jiang Yan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/#review30591
-----------------------------------------------------------
On Dec. 18, 2013, 1:08 a.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16332/
> -----------------------------------------------------------
>
> (Updated Dec. 18, 2013, 1:08 a.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Used in a future patch to compare "UPID from" with "Option<UPID> master".
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
> 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
>
> Diff: https://reviews.apache.org/r/16332/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/#review30591
-----------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp
<https://reviews.apache.org/r/16332/#comment58596>
Any need for the 1 suffix on these?
- Ben Mahler
On Dec. 18, 2013, 1:08 a.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16332/
> -----------------------------------------------------------
>
> (Updated Dec. 18, 2013, 1:08 a.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Used in a future patch to compare "UPID from" with "Option<UPID> master".
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
> 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
>
> Diff: https://reviews.apache.org/r/16332/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/
-----------------------------------------------------------
(Updated Dec. 18, 2013, 1:19 a.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
Changes
-------
BenM's
Repository: mesos-git
Description
-------
Used in a future patch to compare "UPID from" with "Option<UPID> master".
Diffs (updated)
-----
3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
Diff: https://reviews.apache.org/r/16332/diff/
Testing
-------
make check.
Thanks,
Jiang Yan Xu
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/
-----------------------------------------------------------
(Updated Dec. 18, 2013, 1:08 a.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
Changes
-------
BenM's
Repository: mesos-git
Description
-------
Used in a future patch to compare "UPID from" with "Option<UPID> master".
Diffs (updated)
-----
3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
Diff: https://reviews.apache.org/r/16332/diff/
Testing
-------
make check.
Thanks,
Jiang Yan Xu
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/#review30590
-----------------------------------------------------------
Ship it!
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp
<https://reviews.apache.org/r/16332/#comment58591>
s/none1/none/
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp
<https://reviews.apache.org/r/16332/#comment58593>
newline, can you call this 'one' and just use an Option<int>::some(1) inline where you need another 1?
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp
<https://reviews.apache.org/r/16332/#comment58594>
newline
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp
<https://reviews.apache.org/r/16332/#comment58595>
Call this 'three'?
- Ben Mahler
On Dec. 18, 2013, 12:29 a.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16332/
> -----------------------------------------------------------
>
> (Updated Dec. 18, 2013, 12:29 a.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Used in a future patch to compare "UPID from" with "Option<UPID> master".
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
> 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
>
> Diff: https://reviews.apache.org/r/16332/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/
-----------------------------------------------------------
(Updated Dec. 18, 2013, 12:29 a.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
Changes
-------
BenH's comment
Repository: mesos-git
Description
-------
Used in a future patch to compare "UPID from" with "Option<UPID> master".
Diffs (updated)
-----
3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
Diff: https://reviews.apache.org/r/16332/diff/
Testing
-------
make check.
Thanks,
Jiang Yan Xu
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Jiang Yan Xu <ya...@jxu.me>.
> On Dec. 17, 2013, 11:35 p.m., Benjamin Hindman wrote:
> > 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp, lines 87-89
> > <https://reviews.apache.org/r/16332/diff/1/?file=398977#file398977line87>
> >
> > Any reason not to do:
> >
> > Option<Option<int> > someNone1 = Some(None());
> > Option<Option<int> > noneNone1 = None();
Ambiguity. We probably would never use it this way but just for theoretical possibility.
../../../../3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp: In member function ‘virtual void OptionTest_Comparison_Test::TestBody()’:
../../../../3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp:88: error: conversion from ‘_Some<None>’ to ‘Option<Option<int> >’ is ambiguous
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp:22: note: candidates are: _Some<T>::operator Option<U>() const [with U = Option<int>, T = None]
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp:29: note: _Some<T>::operator S<Option<U> >() const [with S = Option, U = int, T = None]
../../../../3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp:89: error: conversion from ‘None’ to ‘Option<Option<int> >’ is ambiguous
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp:18: note: candidates are: None::operator Option<T>() const [with T = Option<int>]
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp:27: note: None::operator S<Option<T> >() const [with S = Option, T = int]
- Jiang Yan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/#review30581
-----------------------------------------------------------
On Dec. 17, 2013, 11:21 p.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16332/
> -----------------------------------------------------------
>
> (Updated Dec. 17, 2013, 11:21 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Jie Yu, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Used in a future patch to compare "UPID from" with "Option<UPID> master".
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
> 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
>
> Diff: https://reviews.apache.org/r/16332/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Jiang Yan Xu <ya...@jxu.me>.
> On Dec. 17, 2013, 11:35 p.m., Benjamin Hindman wrote:
> > 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp, lines 87-89
> > <https://reviews.apache.org/r/16332/diff/1/?file=398977#file398977line87>
> >
> > Any reason not to do:
> >
> > Option<Option<int> > someNone1 = Some(None());
> > Option<Option<int> > noneNone1 = None();
>
> Jiang Yan Xu wrote:
> Ambiguity. We probably would never use it this way but just for theoretical possibility.
>
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp: In member function ‘virtual void OptionTest_Comparison_Test::TestBody()’:
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp:88: error: conversion from ‘_Some<None>’ to ‘Option<Option<int> >’ is ambiguous
> ../../../../3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp:22: note: candidates are: _Some<T>::operator Option<U>() const [with U = Option<int>, T = None]
> ../../../../3rdparty/libprocess/3rdparty/stout/include/stout/some.hpp:29: note: _Some<T>::operator S<Option<U> >() const [with S = Option, U = int, T = None]
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp:89: error: conversion from ‘None’ to ‘Option<Option<int> >’ is ambiguous
> ../../../../3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp:18: note: candidates are: None::operator Option<T>() const [with T = Option<int>]
> ../../../../3rdparty/libprocess/3rdparty/stout/include/stout/none.hpp:27: note: None::operator S<Option<T> >() const [with S = Option, T = int]
I can do this though:
Option<Option<int> > someNone1 = Option<Option<int> >::some(None());
- Jiang Yan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/#review30581
-----------------------------------------------------------
On Dec. 17, 2013, 11:21 p.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16332/
> -----------------------------------------------------------
>
> (Updated Dec. 17, 2013, 11:21 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Jie Yu, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Used in a future patch to compare "UPID from" with "Option<UPID> master".
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
> 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
>
> Diff: https://reviews.apache.org/r/16332/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 16332: Added equality comparator for Option vs T.
Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16332/#review30581
-----------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp
<https://reviews.apache.org/r/16332/#comment58572>
Any reason not to do:
Option<Option<int> > someNone1 = Some(None());
Option<Option<int> > noneNone1 = None();
- Benjamin Hindman
On Dec. 17, 2013, 11:21 p.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16332/
> -----------------------------------------------------------
>
> (Updated Dec. 17, 2013, 11:21 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Jie Yu, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Used in a future patch to compare "UPID from" with "Option<UPID> master".
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp f12c0cafad141fe8857fbc14624ce43e3de77171
> 3rdparty/libprocess/3rdparty/stout/tests/option_tests.cpp bda06104f30d7358e0f8829e62e5363954355658
>
> Diff: https://reviews.apache.org/r/16332/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>