> On April 1, 2017, 1:46 a.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/include/stout/stringify.hpp
> > Lines 42 (patched)
> > <https://reviews.apache.org/r/58125/diff/1/?file=1682876#file1682876line42>
> >
> > I should probably have taken a `const std::wstring&` here. Also, is the
`<std::wstring>` 100% necessary?
>
> Andrew Schwartzmeyer wrote:
> * I cannot take a const reference here as the usages of `stringify` receive `std::wstring`
(for some reason the specialization isn't being picked up for a `const &`, I assume Micahel
Park can tell me why, though it's happy to be `const`ed).
> * The `<std::wstring>` is not necessary.
The existing `stringify` functions are a mix of template specializations of `template <typename
T> string stringify(T)` (for e.g., `bool`), and overloads (e.g., the ones for containers).
If you'd declare an overload you should be fine,
string stringify(const wstring&) { ... }
I believe we should fix the base template to take by const ref, see MESOS-6560, but maybe
mpark has an idea if that would have drawbacks.
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58125/#review170799
-----------------------------------------------------------
On April 1, 2017, 6:32 a.m., Andrew Schwartzmeyer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58125/
> -----------------------------------------------------------
>
> (Updated April 1, 2017, 6:32 a.m.)
>
>
> Review request for mesos, Jeff Coffler, John Kordich, Joseph Wu, Li Li, and Michael Park.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Stout: Added stringify for std::wstring.
>
>
> Diffs
> -----
>
> 3rdparty/stout/include/stout/stringify.hpp e9588d8d940046791794100c53469288656a14f0
>
>
> Diff: https://reviews.apache.org/r/58125/diff/2/
>
>
> Testing
> -------
>
> Testing done later in chain.
>
>
> Thanks,
>
> Andrew Schwartzmeyer
>
>
|