> On June 22, 2015, 10:02 p.m., Anand Mazumdar wrote: > > 3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp, line 418 > > <https://reviews.apache.org/r/35743/diff/1/?file=989917#file989917line418> > > > > boost::size(...) would suffice here too albeit minus the small trivial > > run-time cost. > > Jojy Varghese wrote: > Not sure if adding a boost dependency just for size operator would get us > anything here. > > Anand Mazumdar wrote: > Then can we change these to std::array and just invoke the size() > function ? > > (Posting it again here , my bad , instead of adding a new comment) > > Jojy Varghese wrote: > thats a possibility but at teh cost/inconvenience of having to change the > std::array size argument every time we add/remove an argument in the test.
How about then using std::extent here (something like std::extent<decltype(argv)>::value) ? PS: All I want for us is to not re-invent the wheel and add another helper function in our code-base. :-) - Anand ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35743/#review88852 ----------------------------------------------------------- On June 23, 2015, 9:51 p.m., Jojy Varghese wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35743/ > ----------------------------------------------------------- > > (Updated June 23, 2015, 9:51 p.m.) > > > Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and Till > Toenshoff. > > > Repository: mesos > > > Description > ------- > > Changes: > - replacing argument arrays with static initializers in tests. > - making the argument 'argv' const in load method to reflect the semantics. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp > 7584cb871d02ad01021f0c3439ea205736d4f6b4 > 3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp > c2c6a6ac97044f2317418295f48d75e94de4112b > > Diff: https://reviews.apache.org/r/35743/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jojy Varghese > >
