> 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
>
>