> On July 10, 2012, 4:18 p.m., John Sirois wrote: > > src/flags/flags.hpp, line 304 > > <https://reviews.apache.org/r/5854/diff/1/?file=120760#file120760line304> > > > > Couldn't you just specialize add for bool? I had the general > > impression it was a win to not link rtti when you don't have to. > > Benjamin Hindman wrote: > We use RTTI in other places (e.g., for dynamic_cast), so I decided it's > okay here. In general, doing magical flags stuff, to me, really requires more > language support, so it's an okay tradeoff. Also, I can't specialize 'add' > for bool because you can't partially specialize functions (and there are > versions that have more than just the T template argument).
Thanks for the explanation - sgtm. - John ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5854/#review9008 ----------------------------------------------------------- On July 9, 2012, 10:01 p.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5854/ > ----------------------------------------------------------- > > (Updated July 9, 2012, 10:01 p.m.) > > > Review request for mesos, John Sirois and Vinod Kone. > > > Description > ------- > > The first of 13 reviews related to replacing configuration in Mesos with a > "flags" abstraction. In particular, the flags abstraction: > > (1) Eliminates the need to specify defaults in more than one place. > (2) Eliminates the need to specify types for options in more than one place. > > > Diffs > ----- > > src/Makefile.am 11f6b4c > src/common/strings.hpp fbca257 > src/flags/flags.hpp PRE-CREATION > src/tests/flags_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/5854/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
