> On Sept. 19, 2014, 10:25 a.m., Benjamin Hindman wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp, line 205 > > <https://reviews.apache.org/r/25789/diff/4/?file=694225#file694225line205> > > > > At first I was expecting strings::join to just be variadic on > > std::string (like the original strings::join functions). We have a > > 'stringify' operation that we use which ultimately just uses operator <<, > > will we get the same result with the std::string() conversion as we do with > > stringify? Irregardless, let's make sure that we have tests which are > > joining more than just strings if we expect to get more than just strings, > > and that the semantics are expected with stringify!
I made the variadic strings::join() more generic in that it now uses a helper function called append(). This in the general case falls back to stringify, but binds first to special versions for string and const char * that have low overhead. - Joris ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25789/#review53949 ----------------------------------------------------------- On Sept. 19, 2014, 6:37 p.m., Joris Van Remoortere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25789/ > ----------------------------------------------------------- > > (Updated Sept. 19, 2014, 6:37 p.m.) > > > Review request for mesos and Benjamin Hindman. > > > Repository: mesos-git > > > Description > ------- > > Add Variadic strings join for c++11 and above. > There is a second version of the variadic join which takes a reference to a > stringstream as a parameter. This is handy when strings::join is just a part > of a larger string manipulation. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp a1702cd > 3rdparty/libprocess/3rdparty/stout/tests/strings_tests.cpp 51008e5 > > Diff: https://reviews.apache.org/r/25789/diff/ > > > Testing > ------- > > Ran make check for stout. Added test cases for join as these were missing. > > > Thanks, > > Joris Van Remoortere > >